Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ROBOTOO007 |
im trying to make my player’s arm rotate towards my cursor but it rotates very slightly and in the wrong direction here’s my code:
func arm_follow():
var mouse_player_dif = get_global_mouse_position() - $"detective spritesheet/arm_joint".position
$player_arm.rotation_degrees = rad2deg(atan2(mouse_player_dif.y,mouse_player_dif.x))