liabru / matter-js

a 2D rigid body physics engine for the web ▲● ■
MIT License
16.62k stars 1.96k forks source link

Constraints question #1305

Open epurban opened 2 months ago

epurban commented 2 months ago

I have a constraint between two bodys of equal mass. I want to make one of the bodies, who is able to activate the constraint, be able to use it like a tractor beam and pull the other player along with them. Essentially I want the constraint forces to only act on the target body, whereas the tractoring player can fly freely uninterrupted by any physics forces from the constraint. Is this something that can be accomplished using constraints today?

MLH-AIDS commented 2 months ago

Perhaps a force can be applied to the object to counteract the force provided by the constraint