This has something to do with gravity. I was making a grenade and when it touches the ground it just gets deleted after a short delay. I move it higher up into the air and as long as it explodes before touching the ground or very shortly after it explodes properly. Otherwise it’s deleted before it makes it to the ground and the delay doesn’t have enough time to finish.
To be clear.
Begin Play > Delay 2 seconds > Emitter > Sound > Destroy self
It gets interrupted during the delay and just poofs. No emitter or anything. Even when I remove all of my code and even start from a blank slate with a new actor this happens. I remove the projectile movement component and the problem is solved.
So I went and I grabbed a laser projectile I’d made. It’s just a static mesh (sphere) with a projectile movement component. I checked them side by side to see why that one didn’t have the problem. I disabled gravity on my grenade in the projectile movement options and BAM. Problem solved. Except uh. No gravity now. So awks.
If the suggestion by Black Phoenyx does not work for you, I have a few questions for you that will help narrow down what issue is it that you are experiencing.
Quick questions:
Can you reproduce this issue in clean project?
If so, could you provide a detailed list of steps to reproduce this issue on our end?
Could you provide screen shots of any blueprints that may be involved with this issue?
I had to make my Sphere mesh not simulate physics, not enable gravity, and have no collision. And no auto-weld.
I had to add a Sphere Collision Component. (S.C)
I had to make my sphere a child of that component ^ Or that component the root of the sphere. Drag n drop in components window.
With that S.C. : Gravity on, Sim Phys off, Gen overlap events on, Collision preset: custom, Collision enabled - Query only, Object type - World Static, Everything set to block except pawn was set to ignore (probably could set pawn to block as well)
Added the first one I attempted to make by right click > Export Asset and then zipping it up. My problem is solved as far as I can tell but if it helps?
I can reproduce the issue. It’s as simple as:
Create an Actor blueprint (the grenade)
Add a Sphere mesh
Add a ProjectileMovement component.
Set the sphere mesh to simulate physics and have gravity
Use it. It’ll die as soon as it comes to a rest.link text
I am happy hear that you have things working on your end. Thank you for the additional information. I am going to go ahead and accept your answer for this question. If the issue returns please provide any additional information that you may have and I will assist you further.
I realize this is not the solution to this problem, but I did have a problem where when using Projectile Movement to throw a pickup, I’d spawn the pickup from the player character and the pickup would auto destroy after 45 seconds. This was the only post that’s title described my problem perfectly but was not my problem. Maybe this will help some other poor soul looking for the same solution I was.
Solution: On begin play set a delay for 5-10 seconds then get a Destroy Component from the Projectile Movement. Destroying the Projectile Movement component cancels the auto destroy of the actor.