How to make a physical character move without rotation

I am currently developing a simple game that uses a physics engine (Farseer for XNA).

I would like to ask how I can make a character so that he can walk on the ground, jumping onto the platform without spinning.

Because I need to update the position and rotation of the body, because it is a physical object, so it will react like a normal one, which will rotate itself.

Does anyone know how I can fix it?

+3
source share
1 answer

For Farseer 2.1 you can install:

body.MomentOfInertia = float.PositiveInfinity;

Farseer 3.0 has a flag for fixed rotation, which seems to do the same inside:

body.FixedRotation = true;

, :

body.Rotation = 0;

, , , " ". .

+5

Source: https://habr.com/ru/post/1758312/


All Articles