- Home /
Cube won't rotate in roll-a-ball tutorial
hello
I'm trying to do the roll-a-ball tutorial and the cube won't rotate
I believe I wrote the code as the video instructed and the cube still won't budge. can anyone help?
using UnityEngine; using System.Collections;
public class Rotator : MonoBehaviour {
// Update is called once per frame
void Update ()
{
transform.Rotate(new Vector3(15, 30, 45) * Time.deltaTime);
}
}
If you got help from another user, make sure to accept their answer as correct.
Answer by curiouspers · Mar 16, 2015 at 12:57 PM
Check did you attached your Rotator script to your cube?
Curiouspers my one said it needs a reference script nut I don't know what a reference script is?
Answer by ClarkSerecky123 · Aug 31, 2017 at 02:25 PM
I had the same problem as sider87, but my cube had the script attached. Here is my script using UnityEngine; using System.Collections;
public class Rotator : MonoBehaviour {
// Update is called once per frame
void Update ()
{
transform.Rotate (new Vector3 (15, 30, 45) * Time.deltaTime);
}
}
Your answer
Follow this Question
Related Questions
reseting rotation of objects? 0 Answers
Make a cube rotate in right or left direction randomly 3 Answers
Rotate object with touch 4 Answers
Best Technique For 3D Cube Map 0 Answers
How to move/rotate cube forward/back/left/right in C#? 3 Answers