loading
 
Calculate angle
Anonymous
10 year
I am using the calculate angle module to calculate a 2 point line.
My start point is the center of the image and the end point is COG X and COG Y.

I am getting an angle 0f 112 degrees .It is making 0 left side of image and 90 degrees is bottom of image.

Is there a way to set 0 degrees at the top of the image and read the angle in a clockwise direction only, so right side is 90 bottom is 180 and left side is 270.
thanks for any help.


Steven Gentner from United States  [1446 posts] 10 year
Yes, using one of the programming modules

SetVariable "angle", (270 + GetVariable("angle")) mod 360

or just where you use the angle

[(270+angle)%360]

See attached.

STeven.
program.robo

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index