Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. Ogre::Plane floorPlane( Ogre::Vector3::UNIT_Y, Ogre::Vector3( 0, 0, 0 ) );
  2. Ogre::Ray rayToFloor( cameraPosition, cameraOrientation* -(Ogre::Vector3::UNIT_Z));
  3. std::pair<bool,Ogre::Real> objectPlaneIntersection = rayToFloor.intersects( floorPlane );
  4. Ogre::Vector3 pos;
  5. if ( objectPlaneIntersection.first )
  6. {
  7. pos = rayToFloor.getPoint( objectPlaneIntersection.second );
  8. }
  9. Ogre::Vector3 position;
  10. Ogre::Quaternion orientation;
  11. Ogre::Vector3 scale;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement