If I have this code:
if (bally>posy)
{
//above
transform.Translate(0,speed*Time.deltaTime,0);
print ("I should be moving up");
}
if (bally<posy)
{
transform.Translate(0,-speed*Time.deltaTime,0);
print ("I should be moving down");
}
Nothing happens, but if I have 1f, and -1f instead of “speed”, then it works as it should. Anyone know why?