straifing
I''m trying to straif left and right about an arbitrary viewpoint, so that whatever direction I''m currently facing I''ll straif left and right according to that orientation.
Currently I can only straif on the x axis of the world I''m in, rather than from my own orientation. I''d guess there''s some tricky geometry. Is there a good method?
Thanks in advance!
Well strafing is the same as walking forward but in a 90 degree angle.
ECKILLER
ECKILLER
ECKILLER
You can use a look vector and an up vector and update them when you move/rotate...for the strafe you can move along a side vector that is the cross product between look and up vectors.
From these vectors is quite simple to compute positions, rotations...moreover you can compute modelview matrix with no extra calculations.
From these vectors is quite simple to compute positions, rotations...moreover you can compute modelview matrix with no extra calculations.
IpSeDiXiT
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement