Announcement

Collapse
No announcement yet.

Is there a way to make a projectile not dissapear after touching a surface

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Is there a way to make a projectile not dissapear after touching a surface

    A static mesh I have made a projectile, disappears after it hits the ground, is there a way to make it stay?

    #2
    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.
    Unreal Possibilities
    New: Wave Spawning System | Unreal Engine Tips | Hollow Square & Flying Wedge

    Comment


      #3
      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
      Attached Files

      Comment


        #4
        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.
        Unreal Possibilities
        New: Wave Spawning System | Unreal Engine Tips | Hollow Square & Flying Wedge

        Comment


          #5
          Ok. Considering Stormrage256's suggestion, let us not use a ProjectileComponent and use only physics.

          In this case, the ball will now be:

          Click image for larger version  Name:	1.png Views:	1 Size:	331.9 KB ID:	1653038
          (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:

          Click image for larger version  Name:	2.png Views:	1 Size:	112.8 KB ID:	1653039


          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?
          "I have harnessed the shadows that stride from world to world to sow death and madness."

          Comment


            #6
            Also, does your ball mesh have collisions?
            "I have harnessed the shadows that stride from world to world to sow death and madness."

            Comment

            Working...
            X