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.

Dark Physics & Dark A.I. & Dark Dynamix / Physx anti-gravity issue...

Author
Message
Willie Mundermuffin
18
Years of Service
User Offline
Joined: 5th Jan 2006
Location:
Posted: 7th Mar 2010 22:07 Edited at: 7th Mar 2010 22:08
The object uses object as ramps to do jumps over other objects. This normally works fine, but once in a while when the object points too high up, it continues to go up as though gravity loses it's grip on the object (note: it continues going up as long as the user presses forward to continue adding forward force to the object).

I've uploaded video demonstrating what i'm talking about.
Here's the object working properly:
http://www.youtube.com/watch?v=czEvWCg-_nA
Here's it misbehaving:
http://www.youtube.com/watch?v=Gp0EdlubXY4

Thank you

Life would be easier if I had the source code.
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 8th Mar 2010 07:37
You use "phy set rigid body force"?
The help files states something like "If you continuously set the velocity of an rigid body yourself. forces such as gravity and friction will not be able to manifest themselves."

Try the "phy add rigid body force" command set.
Or you could add a check whether the object is on ground or if it is flying, and only apply force when it is on the ground.

Regards
Willie Mundermuffin
18
Years of Service
User Offline
Joined: 5th Jan 2006
Location:
Posted: 8th Mar 2010 10:03
Actually, I am already using add force. I've also tried testing for collision with the ground, but the collision system doesn't work with triangular meshes, such as the "ground" model I use. Thanks for trying though.... Any more ideas anyone??? It acts like everything works fine as long as the "vehicle" doesn't point too far up. I don't want to limit the x axis angle though - this will cause unnatural rotations.

Life would be easier if I had the source code.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Mar 2010 19:24
this might help, have you tried making your ground model as a 3ds instead of an x if it is one.

or using PHY SET RIGID BODY CCD Integer Value, Integer Value

worth a try, even if you just to post tp say NO that it did not work.

Dark Physics makes any hot drink go cold.
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 8th Mar 2010 19:37
Quote: "the collision system doesn't work with triangular meshes"


Yeah it does, i use very high poly .x meshes as static rigids. Works perfectly and can go way above 200 collisions/frame but the DP collision collection is very fast. The raycasting is abit tricky though.

Using add rigid body force you still have to check the objects speed and cut of the force when it reaches it's max velocity otherwise it will accelerate indefinitely reaching escape velocity and overtake gravity. Also you need some way to detect if you are on the ground and only apply the force when it is in contact with the ground, unless you are simulating a rocket car . Hard to say any more w.o looking at some code.

I would not use a block either, the second video shows the block snags on the ramp and the lower right corner penetrates. This is the worst scenario ever in a physics engine as penetrating objects repel each other with extreme force. Wont be easy to make the action predictable with a rigid box setup.

Regards
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 8th Mar 2010 19:43
@HowDo on a side note, i looked over your 3ds/.x code (in a post some month back, phyraycast2.dbs) it's actually the 3ds objects that are showing the wrong raycast normal angles not the .x mesh (the 3ds objects are on the bottom row)

Regards
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Mar 2010 20:13
Quote: "@HowDo on a side note, i looked over your 3ds/.x code (in a post some month back, phyraycast2.dbs) it's actually the 3ds objects that are showing the wrong raycast normal angles not the .x mesh (the 3ds objects are on the bottom row)

Regards "


was not so much the raycasting, as an object reacting correctly when knocked or dropped, might just be that AC3D can not export in X correctly. models work fine if I export in 3ds.

Thanks for pointing out the above.

Dark Physics makes any hot drink go cold.
Willie Mundermuffin
18
Years of Service
User Offline
Joined: 5th Jan 2006
Location:
Posted: 9th Mar 2010 05:26
That is a valid point about using a box for collision. The reason I used it instead of a sphere or capsule is that I figured it would roll, unlike a box. Then again, if i keep the friction low and rely on linear damping as a pseudo friction, I wouldn't have to worry about roll and could use a sphere. Thank you all for your suggestions. If anyone else has any more input to shed light on the situation, it would still be appreciated.

Thanks

Life would be easier if I had the source code.

Login to post a reply

Server time is: 2024-11-24 16:09:36
Your offset time is: 2024-11-24 16:09:36