|
Okay so I'm having trouble with this movement script. I'm a super beginner (actually I know nothing of scripting at all, and I got this from the Tornado Twins). For some reason my character spins like a clock, instead of around the Y axis. Thanks for the help! -Rov
(comments are locked)
|
|
Well this is very helpful if you want to learn scripting in java, boo or C#. http://unity3d.com/support/documentation/ScriptReference/ Have a look at this and make sure you closely study the scripts and see how they are made and what each function does. This site helped me alot when I first started out in unity.
(comments are locked)
|
|
Well if that's the only script that affects your player it's obviously that So you should check your InputManager how the virtual axis is defined. Watchout, an axis can appear multiple times for example one time with keys like "a" and "d" a second time with "left arrow" and "right arrow" and maybe another one for a joystick or something else. Thanks, I check that out. -Rov
May 04 '12 at 03:56 AM
Rovalin
Also you should multiply the horizontal control by Time.deltaTime to make it framerate independent:
May 04 '12 at 05:20 AM
aldonaletto
(comments are locked)
|
|
I figured out it wasn't a problem with the script. Thanks for your help! -Rov It would be great when you could actually post what the problem was... otherwise this isn't really an answer to the question and it won't help others. So if you can find the time please edit your answer and add the details what the problem was and how you fixed it.
May 06 '12 at 04:48 PM
Bunny83
(comments are locked)
|

I can tell you what's wrong with your script: At the first glance i would say it's not formatted in a way we can read it, so let me fix that first...