A* Pathfinding Turn Off Rotation

I have a 2D Sprite moving around a 3D world, so I am using A* Pathfinding but it attempts to rotate my little characters sprite in the direction that he is about to walk. But I need that sprite to face the camera.

When I moved Rotation Speed to 0 for the AI Path script it seemed to prevent my character from moving anywhere except the way he was facing.

OK … i seem to have found a solution to this problem just open the “AI path” script and comment these lines

var currentRotationSpeed = rotationSpeed * Mathf.Clamp01((Mathf.Sqrt(slowdown) - 0.3f) / 0.7f);
RotateTowards(velocity2D, currentRotationSpeed * deltaTime);

they are lines number 294&295 to be exact. and in the rigidbody2d freeze z rotation. :smiley: that’s it

I might be wrong cause i am a beginner but i think this is what you are asking for,
GetComponent().enableRotation = false;