Hi! At the moment i create a new web game and i have a speed problem with the different browser systems. When i take the Mozilla Firefox, than i have the same speed like the engine version. When i take the Safari Browser, the speed is faster as both versions. I work with Time.deltaTime and at the moment i don`t no, what can i do to, to clear the problem. I hope anyone can help. Here the little code from a GUI movement: Code (csharp): var xmove : float = 2; var speedtime : float = 0.6; function Update () { xmove += 1; speedtime -= 0.003; if (xmove < 300){ transform.position -= Vector3.up * Time.deltaTime * speedtime ; } if (xmove >= 300){ xmove = 300; speedtime = 0; } } Regards, Train
You can put Debug.Log(Time.deltaTime) somewhere in your script and then look wich the average number is when it plays in the editor. Change Time.deltaTime with that number. maybe that will work I don't know if this is good scripting but you can always try
The issue is that you're moving the transform.position using Time.deltaTime, but xmove and speedtime aren't being changed using Time.deltaTIme. As a result, the faster the browser or the higher the number of frames, the faster those values will adjust. Try adjusting the values so you can multiply them with Time.deltaTime. xmove += Time.deltaTime; speedTime -= 0.003 * Time.deltaTime;
Thanks for the tip, i change it and now it works. But into the firefox browser it jerks, but the x and y is now the same. Is it possible that apple works better with Safari as with Firefox ? I think this is the problem now.