mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Movement: followers will now have their relative angle to the predicted destination considered for a smoother turn movement
This commit is contained in:
@@ -341,9 +341,9 @@ void FollowMovementGenerator::LaunchMovement(Unit* owner)
|
||||
// Now we calculate our actual destination data
|
||||
if (!owner->HasUnitState(UNIT_STATE_IGNORE_PATHFINDING))
|
||||
{
|
||||
float relativeAngle = _target->GetRelativeAngle(dest);
|
||||
float distance = _target->GetExactDist2d(dest);
|
||||
dest = _target->GetPosition();
|
||||
float relativeAngle = owner->GetRelativeAngle(dest) - _target->GetOrientation() + owner->GetOrientation();
|
||||
float distance = owner->GetExactDist2d(dest);
|
||||
dest = owner->GetPosition();
|
||||
_target->MovePositionToFirstCollision(dest, distance, relativeAngle);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user