転んだタンクを元に戻す方法
![89561f92 25ed 4234 9408 e37d05f37f26](https://codegenius.org/uploads/slide/image/3392/89561f92-25ed-4234-9408-e37d05f37f26.jpeg)
リカバーボタンの実装
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Recover : MonoBehaviour
{
private Vector3 rot;
void Update()
{
rot = transform.eulerAngles;
if (Input.GetKeyDown(KeyCode.R))
{
transform.eulerAngles = new Vector3(0, rot.y, 0);
}
}
}
BattleTank(基礎/全31回)
他のコースを見る![89561f92 25ed 4234 9408 e37d05f37f26](https://codegenius.org/uploads/slide/image/3392/89561f92-25ed-4234-9408-e37d05f37f26.jpeg)
リカバーボタンの実装
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Recover : MonoBehaviour
{
private Vector3 rot;
void Update()
{
rot = transform.eulerAngles;
if (Input.GetKeyDown(KeyCode.R))
{
transform.eulerAngles = new Vector3(0, rot.y, 0);
}
}
}
転んだタンクを元に戻す方法