We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi everyone! I'm stuck on a problem, and I don't think there's a simple answer (or any answer at all) so that's why I'm asking you.
Here's the problem: I've got a 3D vector. I'd simply like to rotate the system to align an axis (the z axis for instance) with my vector.
I've tried to do it with rotateX()
and rotateY()
but it didn't work.
That would be pretty easy if, like with the camera()
function, you'd be able to just set the direction to face.
I was looking for a function that would do the job, but I didn't find anything (did I miss it?).
Thank you for your help!
Answers
Can you share an example of what you tried?
Did you use any PVector methods to find the angles between your vector components and the current heading components?