Hrmmm...I do believe you are right, Luke. My bad...it's been a bit
since I actually used this stuff (about 12 years ago in college...heh).
And yes, it would matter, unless you swapped the key functionality
around...but let's keep it simple, yes?
Good thing I'm not programming this project...
Going by radians, 0.0*pi is pointing to the right, 0.5*pi is pointingdown, 1.0*pi
is pointing to the left, and 1.5*pi is pointing straight up.uh, wouldn't pi/2 be pointing up?Don't you set 0 radians to be the positive-x axis and then go counter-clockwise?Or does it not matter?
It seems like it wou
> right now i can make something move up and down, or left and right, but
> if I want to rotate a triangle, then move it so that the 'tip' always
> points in the direction it's going to move, I get stuck.
http://freespace.virgin.net/hugo.elias/routines/rotate.htm
Alan
The "something" you're stuck on is the angle the triangle has rotated,
measured in radians. If the concept of radians is not familiar, then
here's a quick review:
There are 2*pi radians in a complete circle (about 6.28)
There are 360 degrees in a complete circle
1 radian is approximately 57 deg
Hello, I have what should be a basic math question, but I keep messing
it up.
How do I code an equation so that when I have an object facing an
arbitrary vector, pressing a key will make it move forwards in that
direction?
(I understand all the key-based setup, it's just the equation for moving