To keep things simple i have a public variable which i increment in the update function, to over time increase the speed of a game object but my debug messages show the value to increase once and no more to 10.4, repeating themselves every update. I believe this should be simple coding but i cannot get it to work, here is my code
using UnityEngine;
using System.Collections;
public class SpeedControl : MonoBehaviour {
public float speedy;
// Use this for initialization
void Start () {
speedy = 10;
}
// Update is called once per frame
void Update () {
speedy = speedy + 0.4f;
Debug.Log(speedy);
}
I hope you can work out to solve this solution as i have spent ages fiddling around in hope it will work.
Thanks,