FP 3.2 AngularVelocity

Topics: User Forum
Feb 8, 2011 at 8:57 AM

I started my project using version 2.1.3 and moved it over to version 3.2 which took a good while. Got everything working good except for one of the main parts doesn't work at all anymore.

The player has one circle that they can roll using A and D. On 2.1.3 I was just setting the circle.AngularVelocity = 3.0f every so often while the A or D key is being pressed.

In 3.2 I can't get this to work at all. ApplyAngularVelocity() appears to do nothing. I read other discussions, couldn't get much from them except to use LinearVelocity which doesn't work as good and applys force while the circle is in the air. I don't really get the point of a circle that can't use angularvelocity.

The method I used before was perfect, worked/looked great. Is there anyway I can get it like that before even if there are changes to the engine for me to make?

Developer
Feb 8, 2011 at 9:19 AM

As far as I know there is no Body.ApplyAngularVelocity() function in 3.2.

Body.ApplyTorque() on the other hand is used in various samples (including the HelloWorldXNA one) and does exactly what you are looking for. So uhm yeah the name of the function changed...

Remember to scale everything to MKS system in 3.x if you have not done so. That might be another reason, why applying forces seems to be doing nothing.

Feb 8, 2011 at 8:14 PM

I meant Body.ApplyAngularImpulse(). I did work with the demo and did get that and torque working but both were not instant changes and instant acceleration. I did figure out why Body.AngularVelocity wasn't working though, had to make it equal 0 and after that make it equal the value I wanted. So I think I got it working now, thanks.