Rotate around external object

nuxlightnuxlight Posts: 10Member
edited March 21 in 2D

Hi everyone,
I ask your help because i don't know how to do this...
I have a player and i want to add an object (his hand) who turn around its (following the mouse) like this :

Thanks a lot for your help Godot users :)

Tags :


  • cyberealitycybereality Posts: 651Member

    The easiest way would be do adjust the pivot point of the arm to be the same as the character (it's that transparent cross in the middle).

  • nuxlightnuxlight Posts: 10Member

    Should i use the Transform2D class to do that ?
    I understand that can be do with that (to define the origin of arm to the location of Player)

  • cyberealitycybereality Posts: 651Member

    There should be an "offset" property or "pivot offset" in the Inspector when you click on an object. You can just first set the position property of the arm the same as the body, then adjust the offset until it's how you want.

  • nuxlightnuxlight Posts: 10Member

    Excellent !! that works perfectly thanks a lot :)

  • cyberealitycybereality Posts: 651Member


Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file