I have an arm that has a pivot point on it. I want to rotate the arm so that the barrel of the gun points to the cursor. How do I calculate the angle of rotation for the arm? I'm not very good at math :) arm

  • \$\begingroup\$ Does this answer your question? How can I rotate an object based on another's offset to it? \$\endgroup\$
    – DMGregory
    Commented Aug 10, 2023 at 12:38
  • \$\begingroup\$ If you need something different from the answers at that link, or have trouble implementing them, please edit your question to clarify what you need that's different and we can re-open this question for new answers. \$\endgroup\$
    – DMGregory
    Commented Aug 10, 2023 at 12:58
  • \$\begingroup\$ @DMGregory, thanks for the link! It's just what I need \$\endgroup\$
    – Haslin
    Commented Aug 10, 2023 at 18:36


Browse other questions tagged .