13.01.2011, 21:27
i mean the rotation formula. is it working if the object is not attached? iam using another one, and thats doing well. i think that 180-atan2(x1-x2,y1-y2) is the wrong part. to get the attached objects rotation right, you only need to subtract the players rotation.
the formula in the other post is
Angle=-(90+(atan2(YA-YB,XA-XB)));
coz player/object rotations are left/right "handed"
the formula in the other post is
Angle=-(90+(atan2(YA-YB,XA-XB)));
coz player/object rotations are left/right "handed"