I’ve had a read of the math bit of the wiki and the excellent math for dummies slideshow, I get most of it…I think, but there’s something I’m still not getting as I am stuck.
I’m using the default cam and I want to look to the left of a spatial, not directly at it.
View from above:
v1 is the .location of the spatial, v2 doesn’t exist, I need to create and calculate where it is, eg. 90 degrees to the left of v1.
(It’ll probably be 45 deg in the game)
cam.getLeft() should help there, the flyCam uses that to strafe left/right, check the source code of it
(90degreeRightQuat * (v2Pos - camPos)) + camPos
Thanks guys! went with normen’s solution as I may need other angles as well as hard left, here’s the code I used:
Quaternion left = new Quaternion();
Have a happy new year!