Camera getZAxis vs getDirection

Started by Melssj5, October 20, 2008, 03:45:42 AM

Previous topic - Next topic

Melssj5

Hi, Should be the same the getDirection and the getZAxis methods? as the Z axis of the camera should be looking to the front of it. The same of getDirection.....??  ???

or getZAxis gets the projected vector of the get direction over a World plan or something? In my game I was trying to use the getZAxis for seting the direction of my shots by I had strange results like shotting the right and the bullet moving the left. shooting up and the bullet moving to down. Anyway I tested the getDirection method and worked perfectly.
Nada por ahora

EgonOlsen

When thinking about the camera, it feels like you are rotating and moving the camera around in the world. That's how it looks, but that's not what actually happens. What happens is, that you are moving the world around the camera with the inverted values. That's why getZAxis() gives you the inverted directions of what you would expect. getDirection() corrects this internally, hence the difference in behaviour.