How do I set a new Time Scale to an object with Physics?

0 favourites
  • 3 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Here's the problem.

    My character is a ball bouncing around with physics. I need to slow its time scale down when Spacebar is pressed. I've done this:

    When Spacebar pressed >>> Set object time scale to 0.5

    else >>> Reset object time scale

    Unfortunately the object doesn't slow down and I don't know why. Any suggestions?

    More details.

    - The object only uses the Physics behavior and the Move to behavior (which is not active)

    - Physics objects are set to Independent Framerate

    - V-sync is active

    - If I set the entire game time scale to 0.5, the ball actually slows down with everything else. Only if I use the object time scale function it doesn't work.

    - If I use the object time scale function on any other object it works fine.

  • Physics engine is pretty complex and I'm guessing it's not possible to change the timescale of an individual object, because it's part of the "physics world".

    You can try faking it - for example limit its velocity with an event running on every tick.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, I managed to fake it with velocity and it's somewhat convincing. Thank you for your suggestion!

    But my biggest issue is: I already had the system working with time scale. The object had physics and time scale was working perfectly with it!

    Then, I have no idea why, a couple of days ago it stopped working out of nowhere (I've only added a couple of completely unrelated events). I am really confused about why it's not working anymore.

    (And if it isn't supposed to be working at all, then I'm confused about why it DID work at the start haha!)

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