Running Jiglibx On Xbox360

To make this tutorial simple we will convert the basic world tutorial to an XBox project.
Open the project in the link above.

The first step is to make a little change in the source code.

Some where in your code you should find a function similar to this one:
except i have added the world.SolverType = PhysicsSystem.Solver.Normal; line
adding this line is necessary because of a bug in the default Solver Type

 private void InitializePhysics()
        {
            PhysicsSystem world = new PhysicsSystem();
            world.CollisionSystem = new CollisionSystemSAP();

        //important line
            world.SolverType = PhysicsSystem.Solver.Normal;

            fallingBox = new BoxActor(this, new Vector3(0, 50, 0), new Vector3(1, 1, 1));
            immovableBox = new BoxActor(this, new Vector3(0, -5, 0), new Vector3(140, 1, 140));
            immovableBox.Body.Immovable = true;
            Components.Add(fallingBox);
            Components.Add(immovableBox);
        }

and since there is no mouse support on the xbox360
find and remove all things that uses the mouse like:
            MouseState mouseState = Mouse.GetState();

First make sure that you have selected the game project and then, press the button as shown in the picture and then press OK:
namnlsac0.jpg
You can now delete the old project files.
Now we have to set the jiglibX project that we got to unsafe
this is quite easy. right click the Jiglibx project, press properties then select Build in the left tab menu, activate all configurations and then hit the allow unsafe code check box

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License