Hi,
I’m terrible at Vector math, so I need some help…
I’m moving my character with code like this :
moveDirection = new Vector3(pad.position.x, 0,pad.position.y) * 1.5f;
rigidbody.MovePosition (rigidbody.position + moveDirection * Time.deltaTime);
In this code, pad.position is a Vector2.
But now I need to rotate this by 45 degrees. So I would need to either rotate the Vector2 by 45 degrees, or moveDirection around the Y axis. What would be the best way do achieve this? I know there has to be a simple way, but I can only think of slightly complicated ways…
Thanks!