Note: This assumes sn is your (SceneNode*) and mDestination holds the location your sn is trying to go to.
Vector3 vecModifiedDest = mDestination, vecCurrentPosition; vecCurrentPosition = sn->getPosition(); vecModifiedDest.y = vecCurrentPosition.y; sn->lookAt(vecModifiedDest, Node::TransformSpace::TS_LOCAL, Vector3::NEGATIVE_UNIT_Z);
Note (to GCC users): When refering to the TransformSpace you want to use, you may get "Node::TransformSpace is not a class or namespace" errors. This is because you are supplying an enumeration value. Strictly, you should not qualify it with enumeration name itself. I believe other compilers may look over this. If this problem occurs, replace the problematic argument with this: