| 339 | } |
| 340 | |
| 341 | void RenderManager::orientMenuEntityPosition(Ogre::SceneNode* node, const Ogre::Vector3& direction) |
| 342 | { |
| 343 | Ogre::Vector3 tempVector = node->getOrientation() * Ogre::Vector3::NEGATIVE_UNIT_Y; |
| 344 | |
| 345 | // Work around 180 degree quaternion rotation quirk |
| 346 | if ((1.0f + tempVector.dotProduct(direction)) < 0.0001f) |
| 347 | { |
| 348 | node->roll(Ogre::Degree(180)); |
| 349 | } |
| 350 | else |
| 351 | { |
| 352 | node->rotate(tempVector.getRotationTo(direction)); |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | Ogre::ParticleSystem* RenderManager::addEntityParticleEffectMenu(Ogre::SceneNode* node, |
| 357 | const std::string& particleName, const std::string& particleScript) |