EntityMover - no collisions with static mesh

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Crea
Posts: 10
Joined: Tue Feb 24, 2015 10:54 am

EntityMover - no collisions with static mesh

Post by Crea »

I have a number of static meshes in a scene. I add a single entity, and obtain normal collision behaviour when applying velocities directly to the entity myself.

When I move the entity by adding an EnityMover, and setting the TargetPosition, however, I lose collisions with the static meshes in the scene.

Anyone have any ideas?
Crea
Posts: 10
Joined: Tue Feb 24, 2015 10:54 am

Re: EntityMover - no collisions with static mesh

Post by Crea »

The entity is moving as normal when the EntityMover is added (via the LinearMotor, not teleported - it's definitely a Dynamic Entity), and I've confirmed the collisions are being detected - they appear in the contacts list when the Entity collides with a static mesh.

There's just no response being applied.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: EntityMover - no collisions with static mesh

Post by Norbo »

There shouldn't be anything special about the entity mover or its motor for dynamic bodies. Is there truly no collision response at all, or is the motor just strong enough to overpower the contact constraints? If it's the latter, then weakening the motor should fix it:

Code: Select all

            mover.LinearMotor.Settings.Servo.SpringSettings.Stiffness /= 1000;
            mover.LinearMotor.Settings.Servo.SpringSettings.Damping /= 1000;
If there is just no collision response at all, I'll probably need a repro in the demos to figure it out.
Crea
Posts: 10
Joined: Tue Feb 24, 2015 10:54 am

Re: EntityMover - no collisions with static mesh

Post by Crea »

That was it exactly, thank you!
Post Reply