Moving Character

Oct 11, 2008 at 6:53 PM
I have a character shown from the top and I would like to have the following behaviour:$0When I let go of the controls, the character stops moving and rotating. Currently I do that by setting the related values to zero. My problem is that this breaks the laws of the physics and it also looks bad. I could not find a solution to make my character lose enough energy to come to a nearly instant halt when no longer being accelerated.$0$0$0$0$0It would be nice if someone could point me into the right direction how to do that.$0
Oct 11, 2008 at 6:56 PM
You could apply negative force and torque in the opposite direction / rotation that the character currently have.

You could also anchor the character with a joint in the position he is in when you let go of the controls.
Oct 11, 2008 at 7:38 PM
I found the solution:$0$0$0$0The two properties LinearDragCoefficient and RotationalDragCoefficient on the body allow me to do this. Both cause any velocity to go towards zero if no acceleration is applied.$0