public LTDescr setRotateAroundLocal()
{
this.type = TweenAction.ROTATE_AROUND_LOCAL;
this.initInternal = ()=>{
this.fromInternal.x = 0f;
this._optional.origRotation = trans.localRotation;
};
this.easeInternal = ()=>{
newVect = easeMethod();
val = newVect.x;
Vector3 origPos = trans.localPosition;
trans.RotateAround((Vector3)trans.TransformPoint( this._optional.point ), trans.TransformDirection(this._optional.axis), -this._optional.lastVal);
Vector3 diff = origPos - trans.localPosition;
trans.localPosition = origPos - diff; // Subtract the amount the object has been shifted over by the rotate, to get it back to it's orginal position
trans.localRotation = this._optional.origRotation;
Vector3 rotateAroundPt = (Vector3)trans.TransformPoint( this._optional.point );
trans.RotateAround(rotateAroundPt, trans.TransformDirection(this._optional.axis), val);
this._optional.lastVal = val;
};
return this;
}