Hi:
I need some help. I want that every amount of time the speed of my game increases. How can I do? I tried some ways, but just works ones, and then the speed doesn’t increases.
Thank you!! :roll:
Hi:
I need some help. I want that every amount of time the speed of my game increases. How can I do? I tried some ways, but just works ones, and then the speed doesn’t increases.
Thank you!! :roll:
http://unity3d.com/support/resources/unite-presentations/performance-optimization
That should help you out. ![]()
-Jeremy
Hi,
Thanks for the reply, although it’s not exactly what I need.
My scene has a game object which constantly moves in +Y. What I need is to either have a constant increase in speed (with a limit), or to have a step increase which will accelerate the speed to X every X amount of time.
I will attach my script to clarify this:
var speed = 5.0;
function Update () {
// the problem is that it doesn't have a limit!!
speed = speed + 1;
var move = speed*Time.deltaTime;
transform.Translate(0,move,0);
You mean like this?
var speed = 5.0;
var speedLimit = 10.0;
function Update()
{
speed = ( speed < speedLimit )?speed + 1:speed;
var move = speed*Time.deltaTime;
transform.Translate(0,move,0);
Exacty!!!
Thank you very much… ![]()