perf
This commit is contained in:
@@ -295,7 +295,12 @@ namespace Dreamteck.Splines
|
||||
|
||||
private Quaternion GetRotation(Quaternion inputRotation)
|
||||
{
|
||||
rotation = Quaternion.LookRotation(_splineResult.forward * (direction == Spline.Direction.Forward ? 1f : -1f), _splineResult.up);
|
||||
Vector3 fwd = _splineResult.forward * (direction == Spline.Direction.Forward ? 1f : -1f);
|
||||
if (fwd != Vector3.zero)
|
||||
{
|
||||
rotation = Quaternion.LookRotation(fwd, _splineResult.up);
|
||||
}
|
||||
|
||||
if (_2dMode)
|
||||
{
|
||||
if (applyRotation2D)
|
||||
|
||||
Reference in New Issue
Block a user