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 » Mon Nov 06, 2017 10:58 pm

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 » Mon Nov 06, 2017 11:03 pm

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: 4508
Joined: Tue Jul 04, 2006 4:45 am

Re: EntityMover - no collisions with static mesh

Post by Norbo » Tue Nov 07, 2017 12:35 am

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 » Tue Nov 07, 2017 7:27 am

That was it exactly, thank you!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest