Drag box2d at fixture at position clicked without bouncy point

I’m trying to mimic something like this

Box2DDragFixture.zip (3.5 KB)

Here’s my wip. I’m not sure how phaser does it. I tried making the joint 0 length but it’s still bouncy around the joint point which I don’t want. The phaser example does a good job o finding the point and sticking to it, no matter what I do with Defold it’s always bouncy and never finds the point easily (or is not strong enough to follow the mouse / even then it feels weird).

Any ideas on how to improve this?

Videos below showing current behavior / closer to what I want

1 Like

I think I want a Mouse Joint?

defold/engine/physics/src/box2d/Box2D/Dynamics/Joints at 869a87718757bdb7bfd6ed078047fa7bfb451de9 · defold/defold · GitHub

So it would need to be added here and a few other places with the right settings…

Repository search results · GitHub

From the description it does indeed sound like what you want. Is there an equivalent kind of joint in Bullet?

I think btPoint2PointConstraint would be it?

Existing joints don’t work in 3D though, they are only for 2D?

We chose the first set of constraints since there were versions of them in 3D as well.

What do you think the naming should be for a joint like this?

I’ve made an issue for the feature Add physics.JOINT_TYPE_POINT · Issue #5309 · defold/defold · GitHub

https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/bullet/bullet-2.77.zip under demos / opengl / DemoApplication.cpp there is a demo of mouse picking / moving

1 Like