public void Execute(RotationCommandPayload payload) { var degreesY = payload.HorizontalChange * payload.RotationSpeed * unityTimeProxy.deltaTime; var rotationY = Quaternion.Euler(0F, degreesY, 0F); payload.TargetRigidbody.MoveRotation(payload.TargetRigidbody.rotation * rotationY); }
public void Execute(RotationCommandPayload payload) { var h = payload.HorizontalChange * payload.RotationSpeed * unityTimeProxy.deltaTime; payload.TargetTransform.Rotate(Vector3.up, h); }