Maximize On Play

Hello,

When my scene is executed, I get different results between the normal interface and the “Maximize on play” mode. For example, I have an object moving downward at a speed of -0.01f. Now, in the animation played in the interface, the object takes about 6 seconds to reach its final position. On the other hand, this same object in “Maximize On Play” mode takes about 2 seconds (much faster) to descend. The same goes for other objects. Any suggestion on how to resolve this apparent discrepancy.

Thank you

You probably have some framerate-dependent movement code. When the game is maximized, the resolution is higher, and you probably have a slower framerate (and therefore, slower movement speed).

Since you didn’t say “per second” here, I assume you mean “per frame”, which would make sense with what I said above.

The solution is to define your movement speed as “units per second”, and multiply that speed by Time.deltaTime when determining the distance to move in a single frame.

1 Like