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.
How to calculate acceleration
-
- Posts: 7
- Joined: Thu Oct 29, 2009 11:08 pm
Re: How to calculate acceleration
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.
-
- Posts: 141
- Joined: Tue Sep 16, 2008 11:31 am
Re: How to calculate acceleration
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.
-
- Posts: 3
- Joined: Tue Sep 30, 2008 11:01 pm
Re: How to calculate acceleration
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

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
-
- Posts: 141
- Joined: Tue Sep 16, 2008 11:31 am
Re: How to calculate acceleration
Ok, makes sense, thanks. (sorry, didn't mean to come across as critical; I thought I was missing something).
-
- Posts: 1
- Joined: Wed Dec 30, 2009 5:31 am
Re: How to calculate acceleration
So, have we determined that sampling is the only way to get the current linear and angular acceleration of a body?
-
- Posts: 3
- Joined: Tue Sep 30, 2008 11:01 pm
Re: How to calculate acceleration
As far as I know, yes.