[Solved] Put together player parts and their rotation

Hello, I am making an arm and its weapon (both are separate objects) rotate on the mouse position, but when flipping horizontally the objects rotate to a different position than the mouse position.
image
image

here I leave the example:
https://drive.google.com/file/d/1mCtHCcIiX2_RtY2gu6kUKBPztIM6J5NE/view?usp=sharing

Use the “Draw collision hitboxes and points” action to see what’s going on, because when you’re rotating and flipping which moves the sprite points around too :

image

Flip horizontally does not flip on the screen, but the sprite image. When you rotate it, the flip plane/line will be rotated too. So an upside down arm flipped horizontally is still up side down. So you really want to flip it vertically.


Once you’ve done that and understand what is happening, you can implement the following solution, which is to change the left and right facing events to flip the gun and arm vertically and modify the sprite points :

image


and to update the sprite points (check all points) :

Gif of the whole thing:

GunFlip

3 Likes

thank you, it has been perfect
:star_struck: