GRIM: Fix wrong calculation of the angle between two actors.

This commit is contained in:
Giulio Camuffo 2011-09-27 14:32:07 +02:00
parent e7789748cc
commit 6e3728b7c7

View File

@ -804,7 +804,7 @@ void Actor::turn(int dir) {
}
Math::Angle Actor::getYawTo(const Actor &a) const {
Math::Vector3d forwardVec(_yaw.getSine(), _yaw.getCosine(), 0);
Math::Vector3d forwardVec(-_yaw.getSine(), _yaw.getCosine(), 0);
Math::Vector3d delta = a.getPos() - _pos;
delta.z() = 0;