fixed collision detection that go over world boundaries

This commit is contained in:
martin
2011-02-01 18:24:33 +01:00
parent 1687b657d4
commit 8daee27ed8
5 changed files with 233 additions and 24 deletions
+5
View File
@@ -145,7 +145,12 @@ int main (int argc, char* argv[]) {
SDL_WM_SetCaption("Asteroids -BETA1-","Asteroids -BETA 1-");
engine.GetView()->SetGridSize (8,8);
/// \todo get rid of the world settings in asteroids
dynamic_cast<asteroids::Physics*>(engine.GetPhysics())->SetWorldSize (26, 20);
engine.GetPhysics()->SetWorldBounds (vector3d (-13, 0, -10), vector3d (13, 0, 10));
engine.GetPhysics()->EnableWorldWarp(Engine::PhysicsBase::WorldWarpModeX);
engine.GetPhysics()->EnableWorldWarp(Engine::PhysicsBase::WorldWarpModeZ);
// run the default commands and load the configuration
Engine::RunCommand ("exec asteroids.rc");