Can't figure out what joint to use

Hi all,

I have a very simple use case with a joint, but got stuck in figuring it out…

So I have two bodies - some monster and a life bar above it. So when the monster moves, the life bar goes with it.
The two bodies used to be joined with a weld joint and that worked just fine.

But now I changed the monster to use native rotation with obj.rotation (instead of sprite) - and now when the monster is rotated, the life bar gets rotated with it.

So the weld joint needs to be changed with another one, I tried all of them, but couldn’t make it to behave properly - the life bar should follow the movement - up, down, left, right - always keeping a fixed distance, but it should not rotate. While the monster should be able to rotate freely.

Any suggestions would be greatly appreciated :slight_smile: [import]uid: 145398 topic_id: 28410 reply_id: 328410[/import]

Is there a reason you’re using a joint and making the bar a physical object? You could perhaps just match its x to the monster’s x? [import]uid: 52491 topic_id: 28410 reply_id: 114740[/import]

You mean moving the two objects separately?

Yeah I eventually did it like this, it’s probably much better for performance to skip the joint and since it’s a simple movement. [import]uid: 145398 topic_id: 28410 reply_id: 114742[/import]

Separately would be fine, yes - glad to hear you eventually did that. Indeed, it’s a lot simpler than using a joint and making the bar a physics body which is unnecessary. [import]uid: 52491 topic_id: 28410 reply_id: 114915[/import]