View Single Post
  #12  
Old 09-02-2007, 04:57 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by Kyranki View Post
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 View Post
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/* (player.dir 1));
temp.speed 1.5;

player.+= cos(temp.angle)*temp.speed;
player.-= sin(temp.angle)*temp.speed
so what does cos and sin really do, or should I not eally be worrying about them?
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote