Page 1 of 1

Sphere does not collide with StaticMesh if LinearVelocity has been changed?

Posted: Mon May 15, 2017 10:08 pm
by Eltarh
I have a Space with gravity, and a sphere above a single large triangle StaticMesh. When I simulate, the sphere falls until it hits the StaticMesh and stops - exactly as expected.

However, if I do something like

mySphere.LinearVelocity += new Vector3(10, 0, 0);

as the ball is falling, it then falls straight through the mesh. Note my gravity is on the Z axis, so this linear velocity change is perpendicular (not that it should matter, however).

What am I missing here? I can't see why change the velocity should affect collisions. Thanks so much in advance for any help.

Re: Sphere does not collide with StaticMesh if LinearVelocity has been changed?

Posted: Mon May 15, 2017 10:20 pm
by Norbo
Assuming that the velocity isn't sufficient to make it simply miss the mesh, and assuming that it isn't falling at a speed so high that discrete updates just happen to miss the collision when it moves sideways a bit, that isn't expected behavior.

Could you reproduce the issue in the BEPUphysicsDemos, or otherwise show an isolated code snippet that reproduces the issue that I could look at?