I want my sphere to rotate like a ball would and I would like it to happen whenever the player uses the up arrow or the w key. I'm trying a simple script that with a transform function but it's not working for me.
1 Answer
1This is basically straight out of the Unity manual... On the update, you'll need to put in your button code first :)
private var thisObj : Transform;
var rotSpeed = 1.0;
function Start()
{
// Cachhe the transform link
thisObj = this.transform;
}
function Update () {
thisObj.Rotate(0, Time.deltaTime*rotSpeed, 0, Space.World);
}