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 / Why are my objects CREEPING!

Author
Message
fallingb
16
Years of Service
User Offline
Joined: 10th Sep 2007
Location: UK
Posted: 16th Oct 2007 12:46
Hi all,

I have an object which I need to be stationary UNTIL an action has been made (it's a locked door which falls open due to gravity when you blah blah blah)

anyways, I am using the following code:


it all works well EXCEPT for... if you sit and watch the object it gradually falls due to gravity. Only very slowly, about 1 pixel every 5 seconds. Due to the door being quite a way into the level, by the time you get to it, it's already fallen enough to squeeze through.

Why does this occur and how do i overcome it?


Cheers....
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Oct 2007 13:37
PHY SET RIGID BODY SLEEP LINEAR VELOCITY

Sets the linear velocity below which a rigid body may go to sleep. Rigid bodies whose linear velocity is above this threshold will not be put to sleep. If the threshold value is negative, the velocity threshold is set using the engines default sleep linear velocity.

fallingb
16
Years of Service
User Offline
Joined: 10th Sep 2007
Location: UK
Posted: 16th Oct 2007 16:00
Many Thanks BatVink that seems to have sorted it although I'm not really sure what you meant.

I am very new to DarkPhysics hence all the posts on this forum and seem to be having the most problems with the simpler stuff.

I have a new question regarding timing to post now... LOL!!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Oct 2007 17:37 Edited at: 16th Oct 2007 17:37
What this does is set a point at which the object can be considered stationary. Objects that aren't moving (SLEEPing) don't get processed again until a collision happens or you apply a force to them, so they stop.

If you really wanted, you could say that 60 miles an hour is slow enough to stop (or SLEEP). It would be totally bizarre, but this is what SLEEPing allows you to do.

For games physics, you can tweak this value to optimise the game world. In real-world physics, you would atually want to keep this as near to 0 as possible.

Login to post a reply

Server time is: 2024-09-08 00:50:19
Your offset time is: 2024-09-08 00:50:19