- Home /
Question by
MiltonN00B · Oct 13, 2016 at 07:08 PM ·
speedincrease
Increase speed in float over time.
Newbie here :)
Im trying to increase speed in float over time.
public float Speed = 6.0f;
void Update() { if (Speed <= 16.0f) { Speed += Time.deltaTime / 6f; } }
Then I run the game, the object dont increase in speed, however the Inspector changes in the value Speed.
Can anyone please point me in the right direction :)
Thanks
Comment
"Speed" is just a variable. In the code you posted, it has no correlation to the actual moving speed of any object.
What kind of object is it and how is it moved?