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?
Perhaps use the bullet behaviour instead of physics. You can then control initial speed, acceleration/retardation and gravity, plus others
Develop games in your browser. Powerful, performant & highly capable.
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!