I also noticed that calling Space.Update(dt); with a dt of 0f crashes the program. It might be better that it just does nothing, because gameTime.ElapsedGameTime.TotalSeconds; is sometimes 0. I fixed it by adding if(dt>0).
That's interesting; apparently it works fine in v0.15.0 though. A Space.TimeStepSettings.TimeStepDuration of 0 will still cause issues of course.
I had to change where I use Internal properties and where I use the buffered properties to get it all to work, which made me wonder if I'm doing it right.
A good rule of thumb is: if it's gameplay logic, use internal properties. If it's just visual, use interpolated properties. In v0.15.0, note that the Position/Orientation etc. properties exposed on the Entity itself are v0.14.3's "Internal" properties, and the interpolated properties can be accessed from within the Entity.BufferedStates property (so long as the Space.BufferedStates manager is enabled).
I was also wondering what the difference is between CenterOfMass and CenterPosition?
CenterOfMass is the location that the object rotates around in v0.14.3. CenterPosition is the center of the shape. This changes in v0.15.0; there is no longer a CenterOfMass property, just a Position property which is what the entity rotates around. Instead of offsetting the center of mass in v0.15.0, it's possible to offset the shape from the position using the LocalPosition in the entity's CollisionInformation.
On the subject of large entities, I understand that the physics system expects objects to be of sizes that lie in the area of a few meters. However, I want to create very large spaceships (sizes around a few 100's of meters). Is there a way to change the settings of the system to accommodate this? I would like not to have to convert my units to strange things like 100m's, 1000000m^3's and 100N's. Also, the same question for mass.
The best way is indeed to choose your units such that the objects in the simulation are of reasonable sizes. However, extremely large space ships may have relatively tiny projectiles as well. In this case, there are still a few options.
Some shapes pairs, like box-box, box-sphere, and sphere-sphere are numerically resilient. Large sizes won't make much of a difference to them. Triangle-convex pairs are also very resilient in the average case, though things colliding with the edges of triangles are a little more difficult when things are gigantic.
If you can restrict the large body interactions to these resilient pair types, then it should work out okay.
Another option is to compose large objects of multiple smaller objects. This is usually desirable for most large objects anyway, since they generally aren't giant boxes and spheres. The CompoundBody can be used for this. Note that a complicated compound body will run faster in v0.15.0 than v0.14.3.
v0.16.0 is also slated to include dynamic triangle meshes with a few other fancy features as well, so it would be possible to use collision mesh to represent the ship.
Mass is much more forgiving than size as far as numerical issues are concerned, especially if you aren't doing any complex stacking or articulated bodies involving the crazy-mass entities. Just avoid going too crazy and it will work fine.
Is there a way to make the Space Not check collisions, and also (for memory efficiency) an Entity that has a Mass and an Inertia tensor, but no shape? Maybe I can do without a spatial subdivision structure as well, in this case.
The CollisionRules of an entity can be changed to make it not collide with anything. Picking a 'personal' rule of NoPair (NoBroadPhase in v0.15.0) will prevent it from generating overlaps with other objects. More information can be found here:
http://www.bepu-games.com/BEPUphysics/d ... tation.pdf
Entities do not support having no shape, but in v0.15.0 you can share some simple sphere shape amongst a bunch of uncollidable objects and it will have a similar effect. You can define the mass and inertia tensor manually by using the appropriate constructor.
By the way, v0.15.0 is coming very close to release. Most of the bugs should be gone by now if you'd like to try and use it. It's quite a bit faster and more stable than v0.14.3 in many situations. You can get the latest version here:
http://www.bepu-games.com/forums/viewto ... f=9&t=1050