Legacy GM !Ragdoll rotation towards mouse

S

santeri kalliomaki

Guest
Hi! I want my ragdolls head to point at mouse but actually the right side of the ragdoll points towards mouse.
What can I do? :(
I think this is happening because the sprites are not pointing up.....


Code For Direction:

direction = point_direction(phy_position_x,phy_position_y,mouse_x,mouse_y)
phy_rotation = -direction;
 

2Dcube

Member
So it's rotated 90 degrees too far? Just subtract 90:
Code:
direction = point_direction(phy_position_x,phy_position_y,mouse_x,mouse_y) - 90;
phy_rotation = -direction;
 
S

santeri kalliomaki

Guest
So it's rotated 90 degrees too far? Just subtract 90:
Code:
direction = point_direction(phy_position_x,phy_position_y,mouse_x,mouse_y) - 90;
phy_rotation = -direction;
I did not think it would be so easy. Thank you so much! :p
 
Top