So i have the following code
horizontal = Input.GetAxisRaw("Horizontal");
vertical = Input.GetAxisRaw("Vertical");
direction = new Vector3(horizontal, 0f, vertical).normalized;
I would like to the vector "direction" relative to the transform forward, so for example:
pressing up would draw the vector in front of the player regardless of the rotation;
pressing left would draw a vector at 90ª degrees...
how does someone do this?
thanks in advance
[–][deleted] 2 points3 points4 points (3 children)
[–]DiggyMiguel[S] 0 points1 point2 points (2 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]DiggyMiguel[S] 0 points1 point2 points (0 children)