• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

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