Changeset 2509 for GTP/trunk/App/Demos/Illum/Ogre/src/SpaceStation/include
- Timestamp:
- 07/03/07 15:49:39 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/SpaceStation/include/SpaceStation.h
r2491 r2509 107 107 animState->setEnabled(true); 108 108 animState->setLoop(true); 109 110 Vector3 look = FPSPlayer::thePlayer->getPosition() - pos; 111 look.y = 0; 112 look.normalise(); 113 Vector3 right = -look.crossProduct(Vector3::UNIT_Y); 114 Quaternion q; 115 q.FromAxes(right,Vector3::UNIT_Y, look); 116 mNode->setOrientation(q); 117 109 118 } 110 119 … … 112 121 { 113 122 //move forward to target 114 mNode->translate(movespeed * 0.1* Vector3(0,0,1), Node::TS_LOCAL);123 mNode->translate(movespeed * evt.timeSinceLastFrame * 2 * Vector3(0,0,1), Node::TS_LOCAL); 115 124 } 116 125 else
Note: See TracChangeset
for help on using the changeset viewer.