Linear movement along angle besides X or Y

I thought there was a thread on this already - cant find it.

Let’s say I’m moving an object straight up from the center (160,160) to the 12:00 position (160,0). and I’ll move at #DWFSS# speed - the speed is not important, I’ll set that later. So my Y formula is just (#DWFSS#*-1) and at the top of the minute, my object starts its trip up and off the screen until the top of the next minute.

But let’s say I want to move an object from the center to the 2:00 position - a linear travel across a 60-degree path.

anyone have this already? I’m moving 6 slices of a pie. straight up, straight down, then 60-degrees left, 60-degrees right, 120-degrees left, and 120-degrees right.

I’m basically moving from the center to the 12:00, 2, 4, 6, 8, and 10:00 off-screen points. shouldn’t they just be linear ratios? like for 60-degrees maybe X moves twice as fast as Y or something (ignoring pos/neg for a moment)?

Thanks,
John

1 Like

Yes, it should be ratios for the movements

I think you only have to calculate the x and y axis for every 60 degree, depending on my knowlege of the phythagorean triangle in combination with angle functions.

45 degrees means x=y

60 degrees to the upper right x=0.86…y=1

Just sine and cosine-functions.

Is that, what you mean?

yup that’s it. Y moves at some fraction of X speed.

Thanks @GAUSS

john

You´re welcome.

Glad i could help you this time…

Greetings,

Phantasico

Not sure if this was the link you were looking for but just in case.