How can I fix a problem I have with rotation?

AI_MessiahAI_Messiah Posts: 40Member

I have a compass in my game. It needs to be able to rotate, but to line it up with the camera I have to rotate it in the x axis so when I try to rotate it with the y the x rotation makes it uneven.


  • fire7sidefire7side Posts: 864Member

    A picture might help explain your problem. You don't even say if it's 2d or 3d, but I'm guessing 2d?

  • AI_MessiahAI_Messiah Posts: 40Member

    I am making a 3D scene the compass is just a cylinder with the top and bottom removed it rotates with my character. I want to line it up with the camera, but if I try to do that right now the cylinder will go uneven when it rotates in the y axis

  • fire7sidefire7side Posts: 864Member
    edited May 13

    Not positive this will work but you could try compass.rotation.y = player.rotation.y. If you haven't tried it already. Otherwise it's over my head. I think if it's saved as a scene, it will change the local rotation, so if the y is up in both scene, then you rotate the compass in the world, it will rotate it as it was saved in the scene, or not.

  • AI_MessiahAI_Messiah Posts: 40Member

    The compass is in the same scene as my camera. I know how to rotate it in the y axis. It works better if I don't line it up with the camera so it wouldn't be a curve shape

  • fire7sidefire7side Posts: 864Member
    edited May 14

    This should be possible because I have an airplane propeller that rotates on a plane using the rotation property in an animation. The plane can fly in any direction and the propeller is always pointing the right way aligned with the plane. It's a child of the plane.

Sign In or Register to comment.