Decelerating a projectile's speed?

Hello again, I was wondering if anyone could help me out with the bubble projectile I’m trying to make. Basically, when the bubble projectile is spawned I want it to start out moving quickly but then quickly loses it speed. I can’t seem to find any settings for a projectile’s acceleration within the projectile’s blueprint nor I have had much luck in finding any tutorials online for this.

Any help whatsoever would be greatly appreciated!

if its physics based you can add a friction or opposing force

if its projectile movement you can just lower the projectile velocity on tick

1 Like

Its based on Projectile Movement. I would prefer physics-based as simply changing the bubble’s friction would be simpler to do but the problem is how would I be able to keep the bubble in the air with physics enabled? As for Projectile Movement I’m a bit worried about too many things using tick on the screen all at once, also I don’t know how to lower velocity via scripting.

just add drag.

1 Like

you can Get/Set Velocity directly on the root component

depending on how you implement it you could use a timer instead of tick but sometimes this is what tick is literally for

1 Like

To expand on my earlier answer…

Drag and inertia is already applied by default to any physics enabled object.

So for your projectile’s mesh component make sure you are simulating physics
24-07-19

Also take note of the linear damping setting, by default it is 0.1, this is your drag strength or inertial dampening setting. If you set it to 1 then your projectile will slow down pretty fast.

This is the result with the above setting on the mesh and the projectile movement initial speed set to 500.
output

A perhaps better approach would be to simply enable gravity for the projectile since gravity also slows it down, if you want to have gravity on the projectile then it’s usually the way to go.

1 Like

Okay, so I tried enabling physics like you suggested but the problem is that the bubble loses it ability to stay air and comes crashing to the ground as soon as it spawns.

Alright, so I figured something that helps a bit but now I have a problem where if the player character is facing to the left and launches a bubble, the bubble will start moving to the right after decelerating.

I know what’s causing the problem, the Set Velocity node has set the velocity going to the right but I don’t know how to fix it so that the bubble retains its direction after slowing down.

disable gravity.

1 Like

you’re setting the velocity to the right, Y axis, if you just want to slow it down,

GetVelocity (this returns direction as well) clamp it and then set the velocity to the return value which will retain direction.

you need to decide if you want physics or projectile too, either is fine but dont do both.

1 Like