[Just Started] Rotation Issue

Depending on your programming experience, you could run through a few of the small game tutorials here on Unity’s site, in the ‘Learn’ section. That should get you comfortable with Unity, in general.

In the future, read this post for how to post code more nicely on the forums: Using code tags properly
I cannot read all of your post because it is cut off.

Using what I’m a little more used to, this is a very basic piece of code that closely matches yours (I think)…

public class Test13 : MonoBehaviour
{
    Transform player;
    float mouseLook;

    void Start()
    {
        player = transform.parent;
    }

    void Update()
    {
        float mx = Input.GetAxis("Mouse X");
        float my = Input.GetAxis("Mouse Y");

        mouseLook += my;
        mouseLook = Mathf.Clamp(mouseLook, -45, 60);

        player.localRotation *= Quaternion.Euler(0, mx, 0);
        transform.localRotation = Quaternion.Euler(-mouseLook, 0, 0);
    }
}

As for courses, I hear good things about Udemy and for swords and shovels mostly good, too.
I do believe it’s an option, if you first spend some time getting used to Unity and getting a little bit done, first, before going forward. If you’re still interested later, go for it… :slight_smile:

1 Like