private void UpdatePosition() { if (Body == null) { return; } transform.position = Body.GetGlobalPositionAndVelocityAt(TurnAnimationController.Instance.TurnTime).Item1; }
private void Update() { if (Body == null) { return; } transform.position = Body.GetGlobalPositionAndVelocityAt(Application.isPlaying ? Time.time * TimeMultiplier : 0) .Item1; }
public Tuple <Vector3, Vector3> GetGlobalPositionAndVelocityAt(float time) { (Vector3 centralPosition, Vector3 centralVelocity) = _centralBody.GetGlobalPositionAndVelocityAt(time); (Vector3 localPosition, Vector3 localVelocity) = GetLocalPositionAndVelocityAt(time); return(new Tuple <Vector3, Vector3>(centralPosition + localPosition, centralVelocity + localVelocity)); }