Hi.
I used latest version of BEPUPhysics. In my Space there are several objects including MobileMesh. Under certain conditions I need to set the angular acceleration of the Y axis. Under Windows it works well. But under WP7 FPS drops from 60 to 2. What a problem? Thank you.
Problem with MobileMesh on WP7
Re: Problem with MobileMesh on WP7
Changing angular velocity alone should not cause a problem. What may be happening is the MobileMesh is in an expensive collision but asleep. When the angular velocity is set, the entity wakes up and collision testing resumes.
The cost could be magnified by using internal time stepping. Calling Space.Update(dt) simulates however many time steps are necessary to keep up with the accumulated passed in time. If the simulation takes longer to simulate than the time allotted to it, it will enter a vicious cycle of trying to keep up by updating multiple times and failing until the simulation calms down. Calling Space.Update(), on the other hand, performs a single time step.
Note that high-detail MobileMeshes are quite expensive. If the source of the slowdown doesn't turn out to be something strange, it may help to just approximate the model more. A compound body of a few simple convex hulls or other primitives will be a lot faster than a mobile mesh of hundreds of triangles.
The cost could be magnified by using internal time stepping. Calling Space.Update(dt) simulates however many time steps are necessary to keep up with the accumulated passed in time. If the simulation takes longer to simulate than the time allotted to it, it will enter a vicious cycle of trying to keep up by updating multiple times and failing until the simulation calms down. Calling Space.Update(), on the other hand, performs a single time step.
Note that high-detail MobileMeshes are quite expensive. If the source of the slowdown doesn't turn out to be something strange, it may help to just approximate the model more. A compound body of a few simple convex hulls or other primitives will be a lot faster than a mobile mesh of hundreds of triangles.