I have UNITY 4.6.2. I was trying to move a sphere using a slider.
I wrote the C# code…
transform.Translate (slider.value, 0, 0);
It does nor work properly. When I move the slider, the sphere moves but then the slider randomly starts moving without me touching it and the sphere does the same. What should I do?
The problem is that every time Translate is called, it will move the sphere.
If you are then feeding the position back into the slider, it will have an amplification effect where the position is doubled every time Translate is called.
We need more clarity about what you are trying to do.
Is the slider supposed to control the position of the sphere, or it’s velocity?