error cs1612 transform.position
ok so i know that error cs1612 means you need to store a value in a temp var but i have done that and it still gives me the exact same error This is the line of code that is indicating has the error: transform.position.y = Zero1;
Zero1 is a int with the value 0;
Comment
Best Answer
Answer by gjf · Feb 12, 2016 at 02:34 PM
position.y
is a float
as noted here in the Vector3
definition.
but your problem is that you cannot change just the y
component. you need to get the position
into a temp variable, change the components you wish, then set position
from the temp variable.