Search Unity

Rotation via Mouse Location with new Input System

Discussion in 'Getting Started' started by cipher-dev, Feb 23, 2021.

  1. cipher-dev

    cipher-dev

    Joined:
    Dec 14, 2017
    Posts:
    2
    Hey there!
    I'm fairly new to Unity but really want to learn it now!
    I want to use the new ways of doing stuff so that I dont have to learn something new when they become the standard like the new input system.
    The input system is great! I like it way much more than the old one ... but the old one was "easier" and has more support with tutorials.

    So now to the problem I have :
    I want to make a 3D game (just to try features of the engine) from a kinda angled top down perspective and want the camera to be static but the player to be able to rotate. To do so I want to use mouse Input.
    I set up everything to get the 2D Vector from the mouse Input and tried to use some examples that I found with the old system to work with the new one since I cant find a tutorial with the new system but no matter what I try it just dont work.
    Either the rotation is really messed up (its not rotating accordingly to the mouse or just simply is weird in general) or it doesnt work at all.
    I tried functions like the Maincamera to Worldpoint thing but that just says that the 2D Vector from my mouse cant be converted but as far as I know Input.GetAxis gets a 2D Vector as well but there it is supposed to work?

    Its really frustrating to have a start like this where I get lost with basic movement like that.
    I really love the workflow with Unity and to use C# but that just feels bad.

    I hope someone can help me with that !