Connecting to a rotating object.

H

Hurricane

Guest
How would I go about connecting an object to an object that rotates? I have been able to connect objects that move with other objects by making them have the same x and y coordinates, but that doesn't work when it comes to rotating. Does anybody know how to do this?
 

obscene

Member
EDIT:

x_of_secondary_object=x_of_primary_object+lengthdir_x(distance_between_origins,image_angle_of_primary_object);
y_of_secondary_object=y_of_primary_object+lengthdir_y(distance_between_origins,image_angle_of_primary_object);
 
Last edited:
H

Hurricane

Guest
EDIT:

x_of_secondary_object=x_of_primary_object+lengthdir_x(distance_between_origins,image_angle_of_primary_object);
y_of_secondary_object=y_of_primary_object+lengthdir_y(distance_between_origins,image_angle_of_primary_object);
Thank you very much that worked. I should go learn more about lengthdir.
 

obscene

Member
Well that's pretty much all it does right there :p Just lets you find a point at a certain angle and distance.
 
Top