Forum rules - please read before posting.

Rigidbody 3D not freezing rotation

Hello,
I'm currently trying to make a 3d with 2d sprites as characters, much like in Don't Starve, so I created the player prefab with an empty as parent and the sprite as a child. When running the game the object rotates as it moves, but I want the object to stay "freezed" in the Y axis so it's always facing the camera. If I check the freeze rotation option in the rigidbody component it stills rotates as always, like it don't really takes into account the rigidbody constraints, I don't really know how to solve this issue as I'm not a expert in Unity or AC.

Comments

  • I already tried adding the player a navmesh agent component and setting Angular Speed to 0, but it's not taking any of this into account.

  • Welcome to the community, @ruperstinsky.

    In order for the sprite child object to face the camera, you need to specifically assign it as the "Sprite child" in the Player's Inspector. This is only an option when using the Sprites Unity or Sprites Unity Complex animation engines.

    A Sprite-based character can still rely on 3D Rigidbody / Capsule Collder / Character Controller components, but the behaviour and animation of the sprite to the way a character moves.

    See this tutorial for details on how to set up a sprite-based character. To then have them move in a 3D scene, you should typically only need to replace their Rigidbody2D / Circle Collider 2D components with either a 3D Rigidbody and Capsule Collider, or a Character Controller.

    If you still have trouble, share some screenshot links via imgur.com of your character's root and sprite child, and we can take a look to see what the issue might be.

  • It worked! Thank you very much.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.