Cannot get a box to fall
Posted: Sat May 14, 2011 3:25 am
Just getting started with BEPU. On a deadline, and BEPU seems to be a solid solution. I have two questions (for now, pretty sure more will follow).
1: I've created a space and set the gravity. Also created a Box and added it together with a XNA Model to a DynamicModel class I created. Finally add the box to the space.
I call space.Update() in one of my update methods. So why isn't this box of mine falling. Or is it, just that the model isn't moving?
2: How are the entites linked to models? I haven't been able to figure that out from the samples. It may be that the answer to this question is also an answer to the first question.
1: I've created a space and set the gravity. Also created a Box and added it together with a XNA Model to a DynamicModel class I created. Finally add the box to the space.
Code: Select all
Space space = new Space();
space.ForceUpdater.Gravity = new Vector(0, -9.82f, 0);
Box box = new Box(new Vector3(85, 10, 0), 5, 3, 10, 10);
cube = new DynamicModel(content.Load<Model>(@"cube"), new Vector3(85, 10, 0), box);
space.Add(cube);
2: How are the entites linked to models? I haven't been able to figure that out from the samples. It may be that the answer to this question is also an answer to the first question.