A static mesh I have made a projectile, disappears after it hits the ground, is there a way to make it stay?
If you’re using the Projectile Movement Component, you can call its Stop Movement Immediately function when the projectile hits something. Also maybe disable the collision if you don’t need it anymore.
Can you by chance show me an example, I don’t have the actual component in my component window I have this Blueprint on my ball actor currently
I had assumed that you were using a projectile movement component to move the projectile. Since you’re using physics, there is no need to add that. I tried out a similar setup with a basic sphere and it stops on hitting the ground. So it could be a problem with the collision settings on the meshes. You can try out a couple of things to see if that’s the case.
Test it with a different static mesh. Preferably one of those cube meshes that come with the engine’s default templates. If it works with those meshes, then the problem could be related to the ball mesh (the original mesh asset in content browser; not the component inside actor) not having collision.
Another potential issue would be the floor itself not being able to collide with the ball mesh. So try out your projectile in the Third Person template and see if it disappears there as well.
Finally, try adding an Event Tick to your blueprint and have it print the actor location. This will let us figure out if the actor just fell through the floor or actually got destroyed.
Ok. Considering Stormrage256’s suggestion, let us not use a ProjectileComponent and use only physics.
In this case, the ball will now be:
(my pawn is set to block, and in your is overlap, and I have no physics material, but you can ignore these differences)
We now use “Add Impulse” to launch the ball in a given direction, which in my case is forward with a force of 10000:
Note the physics parameters, particulary the angular and linear dampings, which will be essential to stop the ball.
Does the ball disapear after the first hit? What happens if you throw it against a wall?
Also, does your ball mesh have collisions?