Scratch that; go back to using computeRotation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3762 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -48,7 +48,6 @@ public class LineSegmentPath extends Path
|
|||||||
_orient = orient;
|
_orient = orient;
|
||||||
_points = points;
|
_points = points;
|
||||||
_durations = durations;
|
_durations = durations;
|
||||||
PathUtil.computeRotation(up, orient, Vector3f.UNIT_X, _prerot);
|
|
||||||
updateRotation();
|
updateRotation();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,8 +89,7 @@ public class LineSegmentPath extends Path
|
|||||||
protected void updateRotation ()
|
protected void updateRotation ()
|
||||||
{
|
{
|
||||||
_points[_current+1].subtract(_points[_current], _temp);
|
_points[_current+1].subtract(_points[_current], _temp);
|
||||||
PathUtil.computeAxisRotation(_up, _temp, _rotate);
|
PathUtil.computeRotation(_up, _orient, _temp, _rotate);
|
||||||
_rotate.multLocal(_prerot);
|
|
||||||
_sprite.getLocalRotation().set(_rotate);
|
_sprite.getLocalRotation().set(_rotate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,6 +99,5 @@ public class LineSegmentPath extends Path
|
|||||||
protected float _accum;
|
protected float _accum;
|
||||||
protected int _current;
|
protected int _current;
|
||||||
protected Vector3f _temp = new Vector3f(0, 0, 0);
|
protected Vector3f _temp = new Vector3f(0, 0, 0);
|
||||||
protected Quaternion _prerot = new Quaternion(),
|
protected Quaternion _rotate = new Quaternion();
|
||||||
_rotate = new Quaternion();
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user