Okay, so I’ve been trying to find the most efficient and straight-forward way of setting an artificial “forward” movement that functions exactly the same way as Vector3.forward does, but in respect to the GameObject Y rotation. I don’t want to account for any other rotation, since this would function exactly like Vector3.forward, but in the relative direction that the object was facing.
So, I’m looking for tips, tricks, pointers or pseudo-code that I can use to piece together a better understanding of how this is accomplished so that I can get the function I need. I don’t necessarily want someone to write the code for me, since that defeats the purpose of learning with full understanding most of the time, but even an example would be good if it’s just a simple oversight that I’m making.
I know about transform.forward, however this takes all local rotation into account and moves in local forward direction. So either I need a way to define a “fake” Vector3.forward based on direction using Y rotation, or I need a way to remove X and Z rotation from the transform.forward direction so that my movement is always on the same plane, regardless of irrelevant rotations.