angle of polygon
Posted: Fri May 14, 2004 2:42 am
How would it be possible to find the angle at which an image is facing, so that you could calculate the x and y directions it would go using sine and cosine? It would have to be a counter based on 360, but when I try
while key pressed is A and W,
carvelocity += 0.05
carangle +=1.0;
car->setRotation(car->getRotation() + core::vector3df(0,0,carangle));
cary = sin(carangle);
carx = cos(carangle);
v.Y += (cary* carvelocity);
v.X += (carx * carvelocity);
it spins way too fast.
any ideas?
Thanks
while key pressed is A and W,
carvelocity += 0.05
carangle +=1.0;
car->setRotation(car->getRotation() + core::vector3df(0,0,carangle));
cary = sin(carangle);
carx = cos(carangle);
v.Y += (cary* carvelocity);
v.X += (carx * carvelocity);
it spins way too fast.
any ideas?
Thanks