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.
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.
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
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.
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.
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.