void FixedUpdate() { ReticleInfo myRI = myMR.GetReticleInfo(); float throttleScale = myTR.GetThrottle(); desiredVelocity = maxVelocity * throttleScale; setVelocity = Mathf.Lerp(setVelocity, desiredVelocity, .01f); appliedDampedTurnRate = (1 - (1 - myRI.reticleMag) * (1 - myRI.reticleMag)) * .2f; transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.Euler(0, myRI.reticleAng, 0), appliedDampedTurnRate); transform.position += transform.forward * setVelocity; }
void LateUpdate() { ReticleInfo myRI = myMR.GetReticleInfo(); transform.position = target.position + offset + myRI.reticleForward * myRI.reticleMag * dampedLeadDist; }