Ogniok
Member
|
Rotating
Hi.
I have a problem with my project. I set up some tanks on map and I want every of them to aim their targets.
To set good angle I use code:
Code:
Flt angle_delta = AngleDelta(turretAngle - PI_2, Angle(targetTank().pos().xz() - pos().xz()));
Flt max_frame_delta = Time.d() * DegToRad(270);
Clamp(angle_delta, -max_frame_delta, max_frame_delta);
turretAngle += angle_delta;
but it don't work. This is what I get:
How must I change this code so it will work fine?
|
|
12-13-2011 07:19 PM |
|