Announcement

Collapse
No announcement yet.

Projectiles going through objects without overlapping, even with continuous collision detection on?

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

    Projectiles going through objects without overlapping, even with continuous collision detection on?

    Has anyone experienced this? I'd like to let my projectile go through multiple objects, firing events as it passes through them. For my thinner objects, like walls, the overlap event triggers very infrequently. It's not even a particularly thin wall. I've tried turning on CCD for the capsule, but it doesn't seem to help. My blueprint is fairly simple: https://imgur.com/a/tFIkXx5

    #2
    Look into physics substeps.

    Comment


      #3
      Thanks, I'll test it out. Any idea why CCD isn't working? I'm assuming turning on substepping for the entire project would have a much bigger performance impact than just figuring it out for this particular object.

      Comment


        #4
        Post pics of your:
        • Collision settings for the capsule, static mesh and one of the SM's your projectile is passing through consistently.
        • Projectile Movement settings
        • Overlap event logic

        Comment


          #5
          it depends on projectile movement speed vs size of collision.

          If you move a 10cm object at 10cm per frame you will always get a response. But what happens when you move a 10cm object at 100m per frame?

          Comment


            #6
            Rev0verDrive

            Collision settings for capsule of projectile:

            https://imgur.com/a/ZvZ6ldc

            Collision settings for the static mesh of the projectile:

            https://imgur.com/a/onMBw2R

            Collision settings for static mesh of projectile it's passing through randomly (again, I occasionally get overlap events, it's just sporadic):

            https://imgur.com/a/yu9FTtx

            Projectile movement settings:

            https://imgur.com/a/wCYjvoD

            Overlap event logic:

            https://imgur.com/a/rIQ5ExN I have more complex stuff planned here, but I wanted to make sure this was working reliably first.

            Comment


              #7
              Is it potentially because my root object for my projectile is not the capsule or the mesh? I tried doing a test where I re-created a similar setup on a new object with no DefaultSceneRoot component, and it seems to be doing better, though I haven't controlled for all of the variables.

              My only problem with this is that I'm inheriting from a base actor class that I hoped to have provide some extra functionality, so it would be a pain if I had to create a new class and duplicate this functionality just to get the SceneRootComponent to go away.

              Comment


                #8
                I thought I had a good lead on this front, but it turned out to be a dud. I tried using OnBeginComponentOverlap with my capsule component directly, rather than OnActorBeginOverlap, thinking this might work, but it still seems to skip over the thin objects. I also tried turning on CCD and sub stepping, but neither worked. My best candidate seems to be the one I mentioned in #7, but I'd really like to find a better approach.

                Comment


                  #9
                  You didn't read or understand my message at all.

                  What is the size of your projectile collision?

                  what is the size of the object you are wanting to collide against?

                  Will you be able to catch an overlap event with a traveling speed of 7000?

                  Comment


                    #10
                    dellis23 Here's a post on how I set up basic projectiles. https://forums.unrealengine.com/deve...nt#post1792891

                    Projectile mesh should have no collision and does not generate overlap events. SM's are only for visuals if needed.

                    MostHost LA Does have a point about substepping.

                    My projectiles don't use overlap .. always blocking hit. My projectiles speeds sit between 650 M/s and 930 M/s with no issues.

                    Comment


                      #11
                      Re: size. I think I understand what you're saying. I skipped over it because partially because I'm not sure how to measure the objects (they all seem to say "scale 1.0"), and partially because they're quite large for projectiles and walls. I'd estimate the projectile is 15cm and the object I'm colliding against is 10cm. I've also tested at speed 3500 with the same problem. I'm mostly using default assets (the wall, for instance, is in the starter pack) and have kept them at sizes that tutorials have had no issues with.

                      Comment


                        #12
                        Depends. If the wall is one side plane, collision failure at speed is common....

                        Comment


                          #13
                          Originally posted by MostHost LA View Post
                          Depends. If the wall is one side plane, collision failure at speed is common....
                          It's the Wall_400x200 asset. It's not a plane. It has a decent thickness. I estimated 10cm earlier, but I'm second guessing myself. It might be up to 30cm. I'm not sure how to get an exact measurement.

                          Comment


                            #14
                            A decent start is to use the collision visualizer.
                            if you have tickness to the wall it will show you the collision.

                            the second thing is to enable sub stepping with default settings, since at a speed of 7,000 with a tickness of 10cm you shouldn't be getting issues.

                            The third thing is to check the projectile. Maybe you just haven't added a collision mesh to it.

                            Fourth thing, is to code an OnTick event to make the collision longer and scaled backwards (like a long tail) based on current velocity, so that collision is forced to happen.

                            Also, collision wise maybe on hit vs on Overlap could do the trick of the other 4 points still fail.

                            Comment


                              #15
                              Oh and, yes. Reviewing things you have on BeginOverlap but the wall is set to block so an overlap event shouldn't happen?

                              Comment

                              Working...
                              X