Quote:
Originally Posted by Kyranki
My suggestion applied to both subjects.
|
I didn't know because you only said "Vectors" then said you should be in 10th grade.
Quote:
Originally Posted by Chompy
Ok, some basic things I learned from playing with sin and cos in graal:
They are from the math term 'trigonometry' where radians is used instead of degrees.
Radians goes from 0 to PI*2.
For example, if you want your player to move in the direction that the player is facing, do this:
PHP Code:
temp.angle = (pi/2 * (player.dir + 1));
temp.speed = 1.5;
player.x += cos(temp.angle)*temp.speed;
player.y -= sin(temp.angle)*temp.speed;
|
so what does cos and sin really do, or should I not eally be worrying about them?