転んだTankを元に戻す方法

タンクを元に戻す
using UnityEngine;
public class RecoverTank : MonoBehaviour
{
private Quaternion currentRot;
void Update()
{
currentRot = transform.rotation;
if(Input.GetKeyDown(KeyCode.R))
{
transform.rotation = Quaternion.Euler(currentRot.x, currentRot.y, 0);
}
}
}

【Unity6版】BattleTank(全31回)
他のコースを見る