comparison melee.d @ 14:af1e8620f027

fixed steering
author zzzzrrr <mason.green@gmail.com>
date Mon, 23 Mar 2009 14:06:47 -0400
parents e1004697cae1
children 8e6a9e390cba
comparison
equal deleted inserted replaced
13:e1004697cae1 14:af1e8620f027
82 ContactState state; 82 ContactState state;
83 } 83 }
84 84
85 // Melee settings. Some can be controlled in the GUI. 85 // Melee settings. Some can be controlled in the GUI.
86 struct Settings { 86 struct Settings {
87 float hz = 30; 87 float hz = 60;
88 int velocityIterations = 5; 88 int velocityIterations = 5;
89 int positionIterations = 1; 89 int positionIterations = 1;
90 bool drawShapes = true; 90 bool drawShapes = true;
91 bool drawJoints = true; 91 bool drawJoints = true;
92 bool drawControllers; 92 bool drawControllers;
157 init(); 157 init();
158 } 158 }
159 159
160 void init() { 160 void init() {
161 // Define world boundaries 161 // Define world boundaries
162 worldAABB.lowerBound.set(-200.0f, -200.0f); 162 worldAABB.lowerBound.set(-400.0f, -250.0f);
163 worldAABB.upperBound.set(200.0f, 200.0f); 163 worldAABB.upperBound.set(400.0f, 250.0f);
164 world = new bzWorld(worldAABB, gravity, allowSleep); 164 world = new bzWorld(worldAABB, gravity, allowSleep);
165 world.boundaryListener = m_boundaryListener; 165 world.boundaryListener = m_boundaryListener;
166 world.contactListener = m_contactListener; 166 world.contactListener = m_contactListener;
167 viewCenter = vec2(10, 10); 167 viewCenter = vec2(10, 10);
168 ship1 = new UrQuan(world); 168 ship1 = new UrQuan(world);
169 ship2 = new Orz(world); 169 ship2 = new Orz(world);
170 ship2.rBody.angle = 3.14159265/4;
170 auto planet = new Planet(world); 171 auto planet = new Planet(world);
171 } 172 }
172 173
173 void drag() 174 void drag()
174 { 175 {