- Home /
Question by
lukeylad118 · Feb 16, 2011 at 11:10 AM ·
playerrotatebce0023without
Help with a script to get an object to rotate slowly without your player moving
Hi Guys, My problem is with this script.
var turnSpeed = 5.0;
function Update () { transform.Rotate((Input.GetAxis("Vertical") * turnSpeed) ); }
I've just spent about half an hour moving characters around because they were 'expected' at certain points. Now after everything is where it is expected to be, I get this error.
Assets/Scripts/Rotate.js(4,21): BCE0023: No appropriate version of 'UnityEngine.Transform.Rotate' for the argument list '(float)' was found.
Help please, it's for my school project that needs to be handed in in 4 hours. Thanks in advance :D
Comment
Answer by Mike 3 · Feb 16, 2011 at 11:17 AM
The overload of Rotate you want is probably the one with 3 floats (x/y/z):
transform.Rotate(0, Input.GetAxis("Vertical") * turnSpeed, 0);
Your answer
![](https://koobas.hobune.stream/wayback/20220613104714im_/https://answers.unity.com/themes/thub/images/avi.jpg)