Need help on this thing…so an asset I bought has an animation parameter called Aim. If i set that parameter to 1 the character aims up, on 0 it aims in front and on -1 it aims down.
So far so good. The concept was easy enough to do and work on the controller. I did a Vector 2 for the right stick and I just assign the y value . It works very good for the controller.
absolute controls: map the mouse X (or Y?) axis to this aim value. In this case, divide the desired mouse axis by either Screen.width or Screen.height . To ensure that a floating point divide is done, you may want to cast at least one argument to the divide to a float.
relative controls: have your own notion of “aim angle” from -1 to 1, and use relative movement of the mouse to change that number each frame, again likely dividing it by some large number such as the screen dimensions above.
You may wish to do a little bit of testing, reading the desired mouse position, dividing it, printing the result to Debug.Log() so you get a feel for what is going on.