GoSpline.getLastNode C# (CSharp) Méthode

getLastNode() public méthode

gets the last node. used to setup relative tweens
public getLastNode ( ) : Vector3
Résultat Vector3
    public Vector3 getLastNode()
    {
        return _solver.nodes[_solver.nodes.Count];
    }

Usage Example

 public override void prepareForUse()
 {
     _target = (_ownerTween.target as Transform);
     if (_ownerTween.isFrom)
     {
         _path.reverseNodes();
     }
     else
     {
         _path.unreverseNodes();
     }
     _path.buildPath();
     if (_ownerTween.isFrom)
     {
         _startValue = _path.getLastNode();
     }
     else if (_useLocalPosition)
     {
         _startValue = _target.localPosition;
     }
     else
     {
         _startValue = _target.position;
     }
     if (_lookAtType == GoLookAtType.TargetTransform && _lookTarget == null)
     {
         _lookAtType = GoLookAtType.None;
     }
     _smoothedRotation = _target.rotation;
 }
All Usage Examples Of GoSpline::getLastNode