Page 1 of 1

Equations for a falling body

Posted: Thu Jan 09, 2014 7:34 am
by Kal-el
Hi everybody,
I have some trouble with Space.Update() function. I hope someone will help me :D.

I use AsynchronouslyDemo with this options:
Space.BufferedState.Enable=false;
timestepping.maximumTimestepsPerframe=1;
and i put a box Box myBox=new Box((0,80,0),1,1,1,1) just for see it fall.
Using the function Space.Update()
and after it I print
Console.Writeline("position"+ myBox.Position +" velocity "+myBox.LinearVelocity );

I expect that the console show me the position,and the velocity of the Box every 16,6ms. Obviously in realtion with xf=x0+v0*t+(1/2)*9,81*(t^2).
But if I calculate the difference of velocity every timestep seems that after few step the time will be contract in 15,5ms.
Con someone explain me why?
Thanks in advance.

Re: Equations for a falling body

Posted: Thu Jan 09, 2014 6:26 pm
by Norbo
But if I calculate the difference of velocity every timestep seems that after few step the time will be contract in 15,5ms.
For a simple undamped falling object, the velocity change per time step will be exactly gravity * dt. If you are observing velocity changes over time which are smaller than this value, it's probably because of nonzero entity.LinearDamping. LinearDamping specifies how much linear velocity decays per second and it defaults to a nonzero value (to approximate air resistance).

Re: Equations for a falling body

Posted: Mon Feb 03, 2014 3:47 pm
by Kal-el
Thanks Norbo! :wink: