コインを回転させよう




コインを回転させる
using UnityEngine;
public class Coin : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
// ★下記の1行を書いてみましょう。
transform.Rotate(new Vector3(0, 0, 90) * Time.deltaTime);
}
}






回転速度を10倍にする
using UnityEngine;
public class Coin : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
// ★回転速度を10倍にする。
transform.Rotate(new Vector3(0, 0, 90) * Time.deltaTime * 10);
}
}
【Unity6版】BallGame(全27回)
他のコースを見る



コインを回転させる
using UnityEngine;
public class Coin : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
// ★下記の1行を書いてみましょう。
transform.Rotate(new Vector3(0, 0, 90) * Time.deltaTime);
}
}






回転速度を10倍にする
using UnityEngine;
public class Coin : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
// ★回転速度を10倍にする。
transform.Rotate(new Vector3(0, 0, 90) * Time.deltaTime * 10);
}
}
コインを回転させよう