- Home /
Whats wrong with this simple code?
Whats wrong with this?
transform.position.y = 0.012f;
?
Comment
Answer by GC1983 · Apr 19, 2013 at 08:58 PM
You cant store an integer like that. You may want to try transform.position = new Vector3(0, 0.012f, 0);
Answer by AlucardJay · Apr 19, 2013 at 08:59 PM
I don't think you could have made the question any more vague.
in uJS : nothing is wrong with it.
in C# : I think you may have to construct a new Vector first
Vector3 newPos = new Vector3( transform.position.x, 0.012f, transform.position.z );
transform.position = newPos;
Your answer
Follow this Question
Related Questions
String.Split() Function Issues 1 Answer
Simple OnGui does not work 1 Answer
I need help with path hexagon 0 Answers
Temporary Rotation 2 Answers
Joystick.cs Invisible 1 Answer