How to slow down physics

0 favourites
  • 5 posts
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • Hey guys,

    If this has been asked and answered before - I could not find it.

    I'm making a game where a cannon shoots a cannon ball to destroy some enemies ("gorilla.bas" style if you remember that one).

    Using physics and solids.

    On button click, I'm having the cannon spawn a cannon ball. Then I apply impulse to the cannon ball at an angle. So far so good. The cannon fires the ball and it goes hit the enemy, describing an arc (due to gravity). Perfect.

    I'm very happy with it so far except one thing: I would like the cannon ball to go slower. It goes too fast. If I half the ball density and the impulse, or double them, he speed is the same (of course). I want some slow motion effect on the cannon ball movement.

    How can I achieve this effect?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Perhaps use the bullet behaviour instead of physics. You can then control initial speed, acceleration/retardation and gravity, plus others

  • Instead of touching the physics, half the timescale for the duration of the shoot.

    It will give a slowdown effect by slowing stretching up the time in your game, should do the trick.

    Also, gravity might have an effect on the speed of your cannon ball, but it will surely have some effect on the trajectory too.

  • AndyWatson bullet won't do, I want it to rise and fall, like a cannon ball would. Kyatric's suggestion did the trick, thanks!

    Funny thing though (and unexpected, probably a bug), the trajectory isn't exactly the same when the timescale is 0.5. I have the cannon firing and collision with the enemy event, with same coordinates, angle, impulse etc (same everything). It hits the enemy when timescale is 1, and it misses it by very little when it's 0.5.

    It doesn't matter much though, all projectiles will fire at half time scale so nobody will notice.

    Cheers, and thanks again.

  • No worries, tho i use bullet with grav in my games to fire sprites on a trajectory. There are many ways to make things work in c2 and that's its genius!

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