Greetings,
In this proof of concept I’m working on has a ball that points towards the cursor, and shoots little puffs in the direction it shoots in, pushing it backwards every time it shoots a puff.
I want the puff to start off fast, but gradually slow down until it comes to a stop. This is what I have so far, but it doesn’t work. The puffs just fly forever:
I already know that I have this wrong, but I have no idea how to accomplish this.
How can I make it so that the puffs start out with a fast force, but slowly decelerate until stopping?
Sort of something like this (I opened the Construct 3 free trial with the bullet shooting example and made some modifications):
Basically, how do I do the thing in the GIF in GDevelop?
Thanks
However, for some reason, instead of slowing them down, the puffs just speed up dramatically and zoom away once spawned. Is there something else I’m missing?
Because you still use permanent force on creation. You can delete the force on creation, and replace it with set var speed of bullet to 100 (Your max bullet speed)
Also trigger once doesn’t work on instant forces.
So your for each loop cannot have trigger once,
and instead you set the force to it’s variable speed and also reduce the variable speed
Your condition needs to change to var speed of bullet > 0
because you move them with 90 speed. (100-10)
you need to have add force and also subtract 10 from the variable as events.
also you need to specify the angle
The puffs are now decelerating just like I wanted them to. Thanks.
However, I have a new problem. I want the puffs to shoot in the direction the ball is facing, not towards the mouse cursor. When I rotate the mouse fast, the puffs shoot in the direction faster than the ball can rotate.
The ball rotates towards the mouse, and the puffs fly straight out of the ball’s face in the direction it’s facing. As of right now, the puffs shoot in the mouse’s direction. How can I change this back to firing from the ball’s angle rather than the mouse’s?
Also, I’m using TimeDelta() instead since it’s better to use. I’ve got the puffs at the right speed I want with some adjustments.