Page 1 of 1

How to calculate acceleration

Posted: Tue Sep 30, 2008 11:09 pm
by adam77
I'm trying to get the acceleration of a given object at a given moment in time.
Does anyone have any tips on how to do this?
Is there a property, or would I have to calculate it from velocity?

Thanks.

Re: How to calculate acceleration

Posted: Mon Nov 23, 2009 6:50 pm
by stooch
adam77 wrote:I'm trying to get the acceleration of a given object at a given moment in time.
Does anyone have any tips on how to do this?
Is there a property, or would I have to calculate it from velocity?

Thanks.

you get a vector from subtracting the current position from the last. the length of this vector is your velocity at that point.
acceleration is the change of velocity, so you would want to sample more than one frame back if you want to establish a trend.

Re: How to calculate acceleration

Posted: Mon Nov 23, 2009 7:28 pm
by RBD
I'm just curious, since I don't really understand the need... rigid bodies have a constant velocity unless a force acts upon them, such as gravity or an other additional user specified force. Therefore, the only acceleration happening is the sum of the force vectors you are applying to an object, which you should already have.... No? Or are you are trying to calculate deceleration caused by friction and/or damping? If you could explain the problem, thanks.

Re: How to calculate acceleration

Posted: Mon Nov 23, 2009 8:33 pm
by adam77
yes i want decelaration as well :-)

for any 2 arbitrary points in time i want the avg. acelaration or deceleration, i just wondered if there was a shortcut to avoid sampling the velocity and calculating myself

Re: How to calculate acceleration

Posted: Mon Nov 23, 2009 9:37 pm
by RBD
Ok, makes sense, thanks. (sorry, didn't mean to come across as critical; I thought I was missing something).

Re: How to calculate acceleration

Posted: Wed Dec 30, 2009 5:34 am
by bkate
So, have we determined that sampling is the only way to get the current linear and angular acceleration of a body?

Re: How to calculate acceleration

Posted: Wed Dec 30, 2009 8:25 am
by adam77
As far as I know, yes.