Forum rules - please read before posting.

3D player model facing down on runtime

I'm just learning how to work with 3D models in Unity and AC.

I have dragged my 3D player model onto the scene, made it the player with the Create Character wizard, and I have created a Navmesh for him to walk on. In scene view and game view the model is rotated correctly, however when I actually run the game the player starts facing down. This only happens when my model is assigned as the player. I tried rotating Player Start to -90 degrees on the x axis, and that actually made it start with the correct rotation, however as soon as I make him walk, he faces down.

I make my models in Blender, and as many of you probably know, there is a slight rotation problem when you import Blender models to Unity because of their different coordinate systems. However, Unity automatically compensates for this by rotating imported Blender models to -90 degrees on the x axis, effectively showing the models correctly rotated in the scene.

Is there something like a pivot point that I need to set for my model, for AC to know which direction it should face, or what could be the problem?

Comments

  • First of all, don't modify your PlayerStart to compensate - as you've found, whatever issue is there will kick in again once they start to move.  The Player must have a local euler rotation of 0 in the X and Z axes.

    Are you exporting to FBX?  In my experience, results are much better when checking "!EXPERIMENTAL! Apply Transform" in the Export FBX options panel.

    As a last resort, you could also try moving your model to a child object of the root Player GameObject so that you can rotate it independently of the root.
  • edited September 2018
    Thank you for the reply, @ChrisIceBox!
    I tried exporting as FBX now with Apply Transform checked, and now the rotation is correct.

    The 'local euler rotation' - is that simply the player transform rotation, or is it something else (and where can it be found)?

    Also, is it generally problematic to use .blend files with AC? I like the flexibility of not having to export to FBX, but if it only works that way, then of course I'll just have to do that.
  • Yes, I was just referring to the Transform rotation.

    Traditionally, .fbx has always been more flexible than .blend - it's used by more than just Blender so there's more reason for Unity to support it.  Being able to omit certain objects like the camera, lights etc from the exported model is also convenient.
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.