- Home /
Objects not rotating their axis.
if (Input.GetKey (a))
{
Transform.Rotate(Vector3.up , 1);
}
Hi.Im typing this but...its not working!My axis are not rotating with the objects.Please help!
Since you are using Get$$anonymous$$ey... are you holding down 'a'?
Does this code compile and run for you? This code that you've pasted here should fail to compile, because Rotate() is not a static function. "transform" needs to be lower-case, so that you access the instance variable associated with $$anonymous$$onoBehavior, rather than referring directly to the type "Transform".
transform.Rotate(Vector3.up, 1);
In addition to the issue that @ncallaway points out, I'm guessing that you want this for the 'if' statement:
if (Input.Get$$anonymous$$ey($$anonymous$$eyCode.A))
Your answer
Follow this Question
Related Questions
rotation to axis conversion problem? 1 Answer
Freeze specific rotation axis of a child 2 Answers
Need to change direction of transform? 2 Answers
Rotation attribution problem 0 Answers
Spinning a sphere, like a globe. 1 Answer