Updated solution.
void faceTarget(irr::core::vector3df targetPos) {
core::vector3df nodePos = targetPos - myNode->getPosition();
myRotation.Y = atan(nodePos.Z/nodePos.X) * (180.0f / irr::core::PI);
if((targetPos.X - myNode->getPosition().X) > 0) {
myRotation.Y = 90 - myRotation.Y;
} else if ...
Search found 3 matches
- Wed Aug 15, 2007 10:58 am
- Forum: FAQs, Tutorials, Howtos, and external tool lists
- Topic: Rotate a Node, face another node
- Replies: 22
- Views: 42865
- Thu Jul 26, 2007 11:24 am
- Forum: Beginners Help
- Topic: Access violation(segmentation Fault)
- Replies: 4
- Views: 308
- Wed Jul 25, 2007 4:16 pm
- Forum: Beginners Help
- Topic: Getting ISceneNode from intersection or tri
- Replies: 0
- Views: 226
Getting ISceneNode from intersection or tri
hi, i have been playing around with the collision manager and i am unable to see a simple way to get the scene node when i use smgr->getSceneCollisionManager()->getCollisionPoint(line, metaSelector, intersection, tri);
if anyone has any examples? or am i missing something really simple?
i know ...
if anyone has any examples? or am i missing something really simple?
i know ...