mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Movement: Don't compute orientation for vertical splines (#28556)
This commit is contained in:
@@ -58,7 +58,8 @@ Location MoveSpline::computePosition(int32 time_point, int32 point_index) const
|
||||
{
|
||||
Vector3 hermite;
|
||||
spline.evaluate_derivative(point_Idx, u, hermite);
|
||||
c.orientation = std::atan2(hermite.y, hermite.x);
|
||||
if (hermite.x != 0.f || hermite.y != 0.f)
|
||||
c.orientation = std::atan2(hermite.y, hermite.x);
|
||||
}
|
||||
|
||||
if (splineflags.backward)
|
||||
|
||||
Reference in New Issue
Block a user