We all know the formula for moving a unit around in a circle on the X&Y plane:
X + dist * cos(angle+movementspeed * pi/180)*
Y + dist * sin(angle+movementspeed * pi/180)*
* also, reset when the angle hits 359 so you keep it in the same angle all teh time
now... the Z plane, a unit's flying height that is, should have a similar formula shouldn't it? I mean, the first formula can be used in some sort of spherical example I guess, can anyone give me a precise... accurate... splendid... awesomeness formula for moving a unit in the Z plane like a circle.
(Mind you, the easy part is to make the unit go back and forth in the Y plane, I've already done it, I can also make a square-ish form using distance, movement speed etc, all from the great book o' physics)
Me likey maths, teach me
X + dist * cos(angle+movementspeed * pi/180)*
Y + dist * sin(angle+movementspeed * pi/180)*
* also, reset when the angle hits 359 so you keep it in the same angle all teh time
now... the Z plane, a unit's flying height that is, should have a similar formula shouldn't it? I mean, the first formula can be used in some sort of spherical example I guess, can anyone give me a precise... accurate... splendid... awesomeness formula for moving a unit in the Z plane like a circle.
(Mind you, the easy part is to make the unit go back and forth in the Y plane, I've already done it, I can also make a square-ish form using distance, movement speed etc, all from the great book o' physics)
Me likey maths, teach me