So, I have an issue. I attached a simple script that should rotate the arms with a gun so that they look at current mouse position, however they look at opposite the current mouse position. I need to invert the values so they look at the cursor properly but I don't know how.
Make sprite look at inverted position of the mouse
This discussion was caught in the moderation queue since you have not confirmed your account yet.
Upon creating your account you should have received an account verification email. The confirmation email may have been incorrectly flagged as spam, so please also check your spam filter. Without confirming your account, future posts may also be caught in the moderation queue. You can resend a confirmation email when you log into your account if you cannot find the first verification email.
If you need any help, please let us know! You can find ways to contact forum staff on the Contact page. Thanks! :smile:
Welcome to the forums @Krokdus!
You can invert the rotation by adding 180 degrees, or PI
, to the rotation result and that should flip the rotation around:
rotation = get_global_mouse_position().angle_to_point(position) + PI