Physics and time scaling

This forum is currently in read-only mode.
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Hello,

    I'm using the physics behavior in my game and I set up a time scaling effect. Unfortunately time scaling does not affect the physics behavior. When everything slows down then stop, some sprites keep falling at the same speed for instance.

    I tried to reset the world gravity every tick with a multiple of timedelta. It worked but as I expected not the way I would have wanted it to . It did not slow down, the gravity simply disapeared.

    How should I make the physics behavior respect my time scaling

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could try to tweak the world scale (both x and y at the same time) reverse relative to the time scale (the lower the timescale, the bigger the world scale)

    To be honest I never really understood what world scale is for, but your objects move slower the higher these values. If you set just the x or just the y the coordinates ratio is also distorted. (sry, I can't explain this, just see for yourself)

  • World Scale makes everything go slower because it's increasing the size of the universe in which the physics are acting. Large objects further away appear to fall slower than small objects near to the viewer.

    Pixels aren't an absolute unit of measurement - picture looking at the world through a screen door. The gaps in the screen are pixels. The further back you go, taking the screen with you, the more area is covered by each 'pixel' and thus the fewer pixels it will fall in a given timespan.

  • World Scale is not available in the event sheet editor. I cannot change these values at runtime

    When my character dies, time slows down and then stops. It takes less than 1 second so when my character dies, I "Always (every tick)" set velocity to (0,0) and angular velocity to 0. It is not smooth but it will be ok until a timedelta based physics behavior.

  • I just recently posted a thread here "Fix Your Timestep" which essentially illustrates this problem and even includes a comprehensive fix for it.

    At this point, it's up to the developers.

    Well, this is open source, I guess I could post a patch. Not something I'm able to dive into right now, unfortunately.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)