Changeset 10349 in orxonox.OLD for branches/ai/src/ai/movement_module.cc
- Timestamp:
- Jan 24, 2007, 6:55:21 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ai/src/ai/movement_module.cc
r10283 r10349 51 51 } 52 52 53 MovementModule::MovementModule(WorldEntity* object) 54 { 55 this->npc=object; 56 } 53 57 54 58 void MovementModule::process(float dt) … … 79 83 80 84 float aMax=maxAccleration; 81 float vMax=800.0f/myRadius;82 85 //float vMax=1000.0f/myRadius; 86 float vMax=maxSpeed; 83 87 84 88 //anti player collision … … 111 115 Vector vectorToDestination=destination-myPosition; 112 116 113 Vector correction= playerCollision*50*3 117 Vector correction= playerCollision*50*3 *6/myRadius 114 118 + npcCollision*50*3 *6/myRadius 115 119 + Vector(0,0,0) … … 137 141 //rotate NPC 138 142 view = movement.cross( Vector(0,1,0) ).getNormalized(); 139 npc->setAbsDirSoft( Quaternion( view, Vector(0,1,0)), 3);143 npc->setAbsDirSoft( Quaternion( view, Vector(0,1,0)),10/myRadius); 140 144 141 145 }
Note: See TracChangeset
for help on using the changeset viewer.