#Alright, sorry. My problem is that when

1 messages · Page 1 of 1 (latest)

shy wind
#

Make a thread. Anyway share your code again but this time use a paste site

#

!code

low palmBOT
final charm
shy wind
#
        // Apply movement to the character
        MoveCharacter(moveDirection);
        // Rotate the character to face the movement direction without tilting
        RotateCharacter(moveDirection);
        moveDirection = Vector3.ProjectOnPlane(moveDirection, Vector3.up).normalized;```
As I mentioned before, you need to do the ProjectOnPlane _before_ calling those functions otherwise it's pointless
final charm
#

@shy wind is there a way to lock the x axis rotation of the transform?

shy wind
#

you have to do it BEFORE the calls to MoveCharacter/RotateCharacter

shy wind
final charm
#

If I put it before, I cant because the movedirection variable doesn't exist yet

shy wind
#

yes just like this

#

So now the code is good

#

the last thing that remains is as we called out much earlier - your 3D model is not imported to Unity correctly

final charm
#

I also tried fixing that. I made it in blender, really simple model. But it isn't rotated properly, but when I rotate it in blender, It imports the same way, do you know how to fix that?

shy wind