Problem with MobileMesh on WP7

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
ShadowTM
Posts: 1
Joined: Thu May 19, 2011 2:26 pm

Problem with MobileMesh on WP7

Post by ShadowTM »

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.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Problem with MobileMesh on WP7

Post by Norbo »

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.
Post Reply