Quote:
|
Originally Posted by Skyld
A bit of math will allow you to move by angle directions.
This might work. Not sure, though, as I have not checked it.
NPC Code:
this.var = (angle / 360) * (pi * 2);
move(cos(this.var) * speed, -sin(this.var) * speed, 0.5, 0);
You should put some kind of check in as to whether the angle is < 0 or > 360, though.
|
actually, i use radians for angle measure. I think most math people do. I know what you mean for angular movement. I meant rotational movement... like going in circles. i don't know what would cover all of the properties of rotational movement though.