コインを回転させよう:transform.Rotate
![501fd831 8066 452c b8d1 cfc7900124d7](https://codegenius.org/uploads/slide/image/330/501fd831-8066-452c-b8d1-cfc7900124d7.jpeg)
![D9c032ad e2bc 4ac6 83fa 9cc6cff59202](https://codegenius.org/uploads/slide/image/331/d9c032ad-e2bc-4ac6-83fa-9cc6cff59202.jpeg)
![F95aea56 f968 4b2b 95ee 755ac064a826](https://codegenius.org/uploads/slide/image/332/f95aea56-f968-4b2b-95ee-755ac064a826.jpeg)
![B27a84ee d0fb 43ea 9409 b26753ccac79](https://codegenius.org/uploads/slide/image/333/b27a84ee-d0fb-43ea-9409-b26753ccac79.jpeg)
コインを回転させる
using UnityEngine;
using System.Collections;
public class Coin : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
// ★下記の1行を記載してください。
transform.Rotate(new Vector3(0,0,90) * Time.deltaTime);
}
}
![3e186e8e 2bf3 4967 ad89 f18c5801f3b8](https://codegenius.org/uploads/slide/image/334/3e186e8e-2bf3-4967-ad89-f18c5801f3b8.jpeg)
![F49e20b7 55cf 4086 be12 23b364dfd68d](https://codegenius.org/uploads/slide/image/335/f49e20b7-55cf-4086-be12-23b364dfd68d.jpeg)
![9c80b69f 72ac 4b1d 88e3 7c75798e213d](https://codegenius.org/uploads/slide/image/336/9c80b69f-72ac-4b1d-88e3-7c75798e213d.jpeg)
![C19334dd b471 41fb 8d47 6d0ebb29460a](https://codegenius.org/uploads/slide/image/337/c19334dd-b471-41fb-8d47-6d0ebb29460a.jpeg)
![0beb54ee 90e5 49a8 a015 be90568eff6d](https://codegenius.org/uploads/slide/image/338/0beb54ee-90e5-49a8-a015-be90568eff6d.jpeg)
![B16a27c3 8c47 41c4 a965 7b551162512f](https://codegenius.org/uploads/slide/image/339/b16a27c3-8c47-41c4-a965-7b551162512f.jpeg)
![F07daafe bdb7 4a62 9182 03b13eb8292c](https://codegenius.org/uploads/slide/image/340/f07daafe-bdb7-4a62-9182-03b13eb8292c.jpeg)
![17519aee 41bc 44d9 84c7 fe9e3671ae5c](https://codegenius.org/uploads/slide/image/341/17519aee-41bc-44d9-84c7-fe9e3671ae5c.jpeg)
![C6078eaa 3e2d 4802 beae 6355d6d55b7b](https://codegenius.org/uploads/slide/image/342/c6078eaa-3e2d-4802-beae-6355d6d55b7b.jpeg)
コインの回転速度を10倍にする
using UnityEngine;
using System.Collections;
public class Coin : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
// ★下記の1行を記載してください。
// 「* 10」を追加する。
transform.Rotate(new Vector3(0,0,90) * Time.deltaTime * 10);
}
}
【旧版】BallGame(全25回)
他のコースを見る![501fd831 8066 452c b8d1 cfc7900124d7](https://codegenius.org/uploads/slide/image/330/501fd831-8066-452c-b8d1-cfc7900124d7.jpeg)
![D9c032ad e2bc 4ac6 83fa 9cc6cff59202](https://codegenius.org/uploads/slide/image/331/d9c032ad-e2bc-4ac6-83fa-9cc6cff59202.jpeg)
![F95aea56 f968 4b2b 95ee 755ac064a826](https://codegenius.org/uploads/slide/image/332/f95aea56-f968-4b2b-95ee-755ac064a826.jpeg)
![B27a84ee d0fb 43ea 9409 b26753ccac79](https://codegenius.org/uploads/slide/image/333/b27a84ee-d0fb-43ea-9409-b26753ccac79.jpeg)
コインを回転させる
using UnityEngine;
using System.Collections;
public class Coin : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
// ★下記の1行を記載してください。
transform.Rotate(new Vector3(0,0,90) * Time.deltaTime);
}
}
![3e186e8e 2bf3 4967 ad89 f18c5801f3b8](https://codegenius.org/uploads/slide/image/334/3e186e8e-2bf3-4967-ad89-f18c5801f3b8.jpeg)
![F49e20b7 55cf 4086 be12 23b364dfd68d](https://codegenius.org/uploads/slide/image/335/f49e20b7-55cf-4086-be12-23b364dfd68d.jpeg)
![9c80b69f 72ac 4b1d 88e3 7c75798e213d](https://codegenius.org/uploads/slide/image/336/9c80b69f-72ac-4b1d-88e3-7c75798e213d.jpeg)
![C19334dd b471 41fb 8d47 6d0ebb29460a](https://codegenius.org/uploads/slide/image/337/c19334dd-b471-41fb-8d47-6d0ebb29460a.jpeg)
![0beb54ee 90e5 49a8 a015 be90568eff6d](https://codegenius.org/uploads/slide/image/338/0beb54ee-90e5-49a8-a015-be90568eff6d.jpeg)
![B16a27c3 8c47 41c4 a965 7b551162512f](https://codegenius.org/uploads/slide/image/339/b16a27c3-8c47-41c4-a965-7b551162512f.jpeg)
![F07daafe bdb7 4a62 9182 03b13eb8292c](https://codegenius.org/uploads/slide/image/340/f07daafe-bdb7-4a62-9182-03b13eb8292c.jpeg)
![17519aee 41bc 44d9 84c7 fe9e3671ae5c](https://codegenius.org/uploads/slide/image/341/17519aee-41bc-44d9-84c7-fe9e3671ae5c.jpeg)
![C6078eaa 3e2d 4802 beae 6355d6d55b7b](https://codegenius.org/uploads/slide/image/342/c6078eaa-3e2d-4802-beae-6355d6d55b7b.jpeg)
コインの回転速度を10倍にする
using UnityEngine;
using System.Collections;
public class Coin : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
// ★下記の1行を記載してください。
// 「* 10」を追加する。
transform.Rotate(new Vector3(0,0,90) * Time.deltaTime * 10);
}
}
コインを回転させよう:transform.Rotate