• 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!

Rotating points around points

Conbeef

Member
this is what I have:

Code:
image_angle += rotSpd;

Points[0,0] = x + lengthdir_x(point_distance(x,y,Points[0,0],Points[0,1]), point_direction(x, y, Points[0,0], Points[0,1]) + rotSpd);

Points[0,1] = y + lengthdir_y(point_distance(x,y,Points[0,0],Points[0,1]), point_direction(x, y, Points[0,0], Points[0,1]) + rotSpd);
This works, but it slowly moves towards the center point(x,y). How do I fix this?
 

obscene

Member
image_angle += rotSpd;
var l=point_distance(x,y,Points[0,0],Points[0,1]);
Points[0,0] = x + lengthdir_x(l,image_angle);
Points[0,1] = y + lengthdir_y(l,image_angle);
 
Top