Exemple #1
0
    public override Vector2 RelativeLerp(TimedValue <Vector2> otherRef, float time)
    {
        Vector3 lerpedVec = TimedVector3.Lerp(this.Value,
                                              this.Timestamp,
                                              otherRef.Value,
                                              otherRef.Timestamp,
                                              time);

        return((Vector2)lerpedVec);
    }
Exemple #2
0
    public override Quaternion RelativeLerp(TimedValue <Quaternion> otherRef, float time)
    {
        Vector3 thisEuler  = this.Value.eulerAngles;
        Vector3 otherEuler = otherRef.Value.eulerAngles;

        Vector3 lerpedVec = TimedVector3.Lerp(thisEuler,
                                              this.Timestamp,
                                              otherEuler,
                                              otherRef.Timestamp,
                                              time);

        return(Quaternion.Euler(lerpedVec));
    }