movementNormal is a Vector3, made from new(Input.GetAxisRaw("MovementX"), 0, Input.GetAxisRaw("MovementY"));
When the player faces the global z axis, the steps are placed correctly. However, when the player faces the global x axis, the steps seem to be offset to the right. This is the only pattern I noticed. The script acts wonky all the time.
Seemingly, the problem is that I can’t get the movementNormal to successfully translate into local a local direction.
Can anyone help me?
Thank you!
Hi!
Thanks a lot for the quick reply.
I don’t really understand the script you quoted.
Basically what that line does is: Vector3 rawInput * Quaternion.Euler(0, transform.eulerAngles.y, 0) but like expected, that yields an operator error. You can’t multiply a Vector3 by a Quaternion.
Also, simply multiplying rawInput (in my case movementNormal) by transform.rotation.y also doesn’t get a better result.
Something I’m missing here?
Haha!!! I would’ve never thought that the order of the multipliers mattered!!! The more you know
Thanks a lot, it works just as intended.
Have a great day!