Im doing some very simple tests until i tried to do a ball like character. Obviously i have some problems with crazy directions and things like that. Then i tried to look for some example and found M2H
s Unity Game Examples with a marble game. Great! I thought.
However, looking at marble movement script, i found this piece of code:
Vector3 movement = (Input.GetAxis(“Horizontal”) * -Vector3.left * movementSpeed) + (Input.GetAxis(“Vertical”) * Vector3.forward *movementSpeed);
Ok…
“movement” is a Vector3 and (Input.GetAxis(“Horizontal”) * -Vector3.left * movementSpeed) + (Input.GetAxis(“Vertical”) * Vector3.forward *movementSpeed) looks like it`s returning a float. O.O
…
It work very well but… HOW???
I tried to copy and paste this code in my script and didn`t work ( ‘;’ expected. Insert a semicolon at the end.).