Whats the correct way todo this?
Do i have to make a vector3df from getVewMatrix[0], [1] and [2] because that seems a bit overkill....
How to get Forward vector from camera?
Found it
Code: Select all
vector3df forward = cam->getRotation().rotationToDirection();
but only works when you bind target and rotation i believe.
a save way would be:
a save way would be:
Code: Select all
irr::core::vector3df forward = cam->getTarget()-cam->getAbsolutePosition();
forward.normalize();
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.