Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / ODE Physics question

Author
Message
JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 6th Oct 2005 02:56 Edited at: 11th Oct 2005 08:21
ODE SET CONTACT FDIR1 obj, value

what's the VALUE?
is that like the WEIGHT of the object or what?

No one, not even your grandmother, loves their toaster as much as Young Rob does
My BLOG really sucks...

Attachments

Login to view attachments
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 6th Oct 2005 03:34
Quote: "If set, take fdir1 as friction direction 1, otherwise automatically compute friction direction 1 to be perpendicular to the contact normal (in which case its resulting orientation is unpredictable)."


Basically what that means is use 0 = No Friction, 1 = Automatic, If you do more than that it is should be 90 degrees from the contact normal. That is +/- 0..180 for how much friction you want.

In most cases 10.0 actually will server just fine.

JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 6th Oct 2005 04:09 Edited at: 6th Oct 2005 04:31
I understand the 1 and 0, but i dont understand the rest, do you mind better explaining for me?

and a few more questions:
1) what would the best way to do the physics for a player object? I don't want it falling over unless he dies or something
2)so I have to apply a force to an object to make it move/rotate? or can I use the normal DBP move object and rotate object commands?
3) So i have a saw object, and I do thus:

so that's my loading/positioning/physics crap there, and I positioned the saw as centered as I could in Milkshape so it wouldn't place the bounding box around it off centered, anyway, so the saws don't quite make it to the floor:

I figure it's making a CUBE around the saw, but I want it to lay on the floor directly. is there a way to adjust the bounding BOX?

4) is there a way to display the collision boxes for debugging purposes?

annnd i think that's it for now

No one, not even your grandmother, loves their toaster as much as Young Rob does
My BLOG really sucks...

Attachments

Login to view attachments
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 6th Oct 2005 11:34
Quote: "I understand the 1 and 0, but i dont understand the rest, do you mind better explaining for me?"


Ask me again when I have more free time, it's not a quickly covered subject. For now just juse 1 or 10, it saves everyone headaches.

Quote: "what would the best way to do the physics for a player object? I don't want it falling over unless he dies or something "


Good news, then there's no Ragdoll yet.. so physics would have to be done on the entire model for now.

Quote: "2)so I have to apply a force to an object to make it move/rotate? or can I use the normal DBP move object and rotate object commands?"


The Physics object automatically updates the Dark Basic Object. The DBO can stil do things itself, but doing that will cause problems as then the physics object will no longer be in the same place.

So you would have to manually update the physics object too.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Oct 2005 11:47
Joel, have a read through http://forum.thegamecreators.com/?m=forum_view&t=62207&b=1, all of your questions are answered in there.

SilentS has explained the SET CONTACT flags very well. I think you're missing a bit of information in Raven's explanation above, though, which we discussed on the other thread...

FDIR1 = 0 No Friction
FDIR1 = 180 = Full Friction, no sliding at all

but in reality, it looks like values between 0 and 20 are far more realistic...

0.5 ~ Ice
10 ~ "Normal" object on "Normal" Surface
20 ~ Very rough objects with minimal movement when pushed along one another, such as rocks.

I don't think the 0/1 values that Raven mentioned are correct. But the ODE manual is quite confusing in parts, I'm really struggling to get my head round some of these parameters.

JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 6th Oct 2005 22:49
umm, i think you gave me the wrong link
that thread has nothing of use in it really

No one, not even your grandmother, loves their toaster as much as Young Rob does
My BLOG really sucks...
JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 10th Oct 2005 21:57 Edited at: 11th Oct 2005 08:24
(BUMP, it was almost to page 3 )
i still need help with this:

3) So i have a saw object, and I do thus:

so that's my loading/positioning/physics crap there, and I positioned the saw as centered as I could in Milkshape so it wouldn't place the bounding box around it off centered, anyway, so the saws don't quite make it to the floor:

I figure it's making a CUBE around the saw, but I want it to lay on the floor directly. is there a way to adjust the bounding BOX?

No one, not even your grandmother, loves their toaster as much as Young Rob does
My BLOG really sucks...

Attachments

Login to view attachments
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 10th Oct 2005 22:32
send me the saw (ms3d file) and i'll see if it still happens with the beta.

still got tonnes of coding to go to get it up to spec

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Oct 2005 22:56
What are your step and gravity values? If you have too large a step, or too small a gravity, they can "hang". It seems like the first movement downwards is so small, it never registers.

The FDIR1 value is friction. ODE SET BODY MASS is the weight.

JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 11th Oct 2005 08:18 Edited at: 11th Oct 2005 08:25
here's the saw file...no texture, but that's not important (attached to this post is the wrong file i grabbed the X file on accident so click the link in the POST not the attached one )
aanddd:
ode start : ode set world gravity 0,-9.8,0 : ode set world step 0.1

is that good for grav and step?

and here is the EXE file too...
Up/down/left/right move the camera, and pgup and pgdn move the camera up/down

No one, not even your grandmother, loves their toaster as much as Young Rob does
My BLOG really sucks...

Attachments

Login to view attachments
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Oct 2005 10:20
Make your step 0.05 and try again. If it fails, drop it to 0.03.

0.03 is not very workable for realtime, but at least you'll know if that's the problem.

Torrey
19
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 11th Oct 2005 10:35
I'm not sure if you made changes just recently but when I viewed your exe file the saws do not hang in mid air. On my system they do fall to the ground and bounce a little then come right back down.


Check out my site!
Oraculaca
21
Years of Service
User Offline
Joined: 6th Jan 2003
Location: Scotland
Posted: 11th Oct 2005 10:55
Quote: "On my system they do fall to the ground and bounce a little then come right back down.
"


Same here.


Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 11th Oct 2005 15:02
weird, alright well there's a problem with something there atleast.
not sure what right now, when I have more time I'll check it properly.

JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 11th Oct 2005 23:13 Edited at: 11th Oct 2005 23:16
Quote: "On my system they do fall to the ground and bounce a little then come right back down."
Quote: "Same here."

are you sure? did you use PAGE DOWN and PAGE UP to get right under them?

BatVink, no good
I think it has something to do with the collision box

No one, not even your grandmother, loves their toaster as much as Young Rob does
My BLOG really sucks...
JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 13th Oct 2005 22:03
*BUMP*

falling off the page again

still need to know how to get all the objects to touch the ground

No one, not even your grandmother, loves their toaster as much as Young Rob does
My BLOG really sucks...
JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 16th Oct 2005 00:59
stilllllll haven't figured this out...

anyyyyyyyy help?

No one, not even your grandmother, loves their toaster as much as Young Rob does
My BLOG really sucks...
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 16th Oct 2005 02:56
try scaling everything 10x bigger i had a small problem with boxes floating in the air then someone said to make them bigger and that fixed the problem


JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 16th Oct 2005 03:22 Edited at: 16th Oct 2005 03:41
ok, i'll scale the saws a bit, but that human model is already rather large

I'll try scaling tho


TEH POOP, didn't work

I've been playing with the collision of the floor object too to see if I could get it working

but I don't think it's that, i've been changing the thickness and stuff, but to no avail

No one, not even your grandmother, loves their toaster as much as Young Rob does
My BLOG really sucks...

Login to post a reply

Server time is: 2024-05-02 03:11:35
Your offset time is: 2024-05-02 03:11:35