void ApplyMoveByTargets()
{
preUpdate = transform.position;
//reset rotation to prevent look interferences as object rotates and attempts to move with translate and record current rotation
Vector3 currentRotation = new Vector3();
if(tweenArguments.Contains("looktarget")){
currentRotation = transform.eulerAngles;
transform.eulerAngles = vector3s[4];
}
//calculate:
vector3s[2].x = ease(vector3s[0].x,vector3s[1].x,percentage);
vector3s[2].y = ease(vector3s[0].y,vector3s[1].y,percentage);
vector3s[2].z = ease(vector3s[0].z,vector3s[1].z,percentage);
//apply:
transform.Translate(vector3s[2]-vector3s[3],space);
//record:
vector3s[3]=vector3s[2];
//reset rotation:
if(tweenArguments.Contains("looktarget")){
transform.eulerAngles = currentRotation;
}
/*
//dial in:
if(percentage==1){
transform.position=vector3s[5];
}
*/
//need physics?
postUpdate=transform.position;
if(physics){
transform.position=preUpdate;
rigidbody.MovePosition(postUpdate);
}
}