Rotate an object around another in relation to the mouse

Hello, I am making a game and I have a sword that I would like to make rotate around the player to point at the mouse’s position, I know how to make it point at the mouse, but I don’t know how to make it move around the player to point at the mouse.

1 Like

Welcome to the flowlab community!
I am going to be a second, but I think I have a solution.

I made this using the new joints. you can also use attachers. I think attachers might be better in your case, but I think you will get the idea.

Why not have the joint connecting in the middle of the player sprite?

1 Like

I think it is, isn’t it?

1 Like


Huh. Thanks, I wouldn’t have noticed it. I will fix it.

(It’s fixed now)

1 Like