Author Topic: Camera position and orientation  (Read 1797 times)

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Camera position and orientation
« on: March 15, 2008, 12:45:50 am »
Hello, I have another simple question.  I need to be able to access the camera's position, a look-at point, and a point in the up-direction.  Looking through the classes, it looks like the methods I will need to use are:

getPosition()        // World Position
getDirection()       // look-at *direction*
getYAxis()           // up-direction *normalized*

My theory is that to get a look-at point, I would add getDirection() to getPosition(), and to get a point in the up-direction, I would add getYAxis() to getPosition().  Since I will be using this idea in methods which are not related to graphics, it would be difficult for me to test if this theory is correct, so I thought it would be smart to ask the experts first ;D  Thanks!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: Camera position and orientation
« Reply #1 on: March 15, 2008, 10:32:08 am »
Sound reasonable to me...