Projectiles overlapping everything

The projectiles that my character calls to damage the enemy overlap but never deal any damage. My projectiles also go through the floor and walls instead of destroying itself. I made the collision the scene root and added the cdd but nothing worked. The collision for the enemies is set to block all, and the projectile is set to overlap all, I tried changing these up a bit and nothing worked. Does anyone have a solution for this?

Hey @DayanaS22!

There’s not much we can do based on your code without being able to see it! :slight_smile: Get us some screenshots of the projectile code on hit and the enemy OnDamageTaken event and get back to us! :slight_smile:


This is my projectile with the collision. I am using a when component overlap node that detects if we are hitting the enemy and its capsule collision then it can deal damage. My print string for the overlap always calls.

This is how my damage is set up, I made a custom one since I am making a skill tree.

Your Root component should be a Sphere Collision component, NOT a static mesh.

Static mesh collisions do not work for poop when using them as the “colliding” component.

Using a collision component as the projectile root you can get hits on sheet planes with velocities upward 100,000cm/s velocities.


Also, for performance you do not want to use Overlaps on projectiles. Massive perf hit!

Every component that has overlap events enabled will perform physics checks every time it moves, and it is quite slow.

Projectiles do sub-step moves.


Demo is firing projectiles with a collision radius of 0.1 cm @ 600,000 cm/s…hitting sheets.

1 Like

@DayanaS22 There are 2 different nodes we can call when using interface communication. One has a yellow pin, and the other an envelope icon:

image

I believe you want to call the :email: version :point_up_2: instead of:

image


Also, do note that the native damage system supports damage types classes who can act as pre-processors:

While making a custom one is commendable, it might be an overkill :innocent: . Have a look and see if this would make sense in your case:

Soms tutorials on topic linked in the post.


It already is, though, right?

My Bad! It looked like a Sphere SM component… the default.

I need to start paying a bit more attention. So used to people having a mesh or scene as root.

I immediately rename components to identify purpose.

2 Likes

Thank you for telling me about this! I will use it for next time. I changed the receive damage message and also changed it to capsule collision and I am still having the same problem with the projectile going through everything. The print string still prints to say it overlaps but it still does no damage. IS there anything else I can try?

Sorry about that. It is a sphere collision, I tried the capsule collision and it still went through everything. Is there something I need to do with the collision presets for the capsule collision?

  • could you clarify how you are Dealing / Receiving damage?
  • could you test it with the default damage system for now?
  • since you’re getting overlap hits (it prints), it would be the custom interface that is to blame

The whole things boils down to:

  • in the Projectile:

  • in the Damaged Actor:

image

That’s really it.


If you need help with your custom system, we’d need its inner workings explained. We can’t see anything bar the incorrect function implementation call. You also have something called target which seems to make little sense, at least at a glance:

The variable is not being Set (we can’t see that), only compared to another instance, yet it is used in the interface call later on…

So I went back and checked using the any damage system from unreal, it also did not register. I have a print string to let me know when the collision overlaps with anything which always calls. But the overlap with the enemy capsule collision never prints. The enemy collision is set to blockall. The receive damage comes from a custom interface I made where I put the message anytime a there is a collision.

This is the problem I am encountering, just flies through everything.

Set the projectile collision to block.
add the hit event…print string on hit.

If it prints the problem is either with overlaps (expensive, non-performant) or conditional/dmg logic.

Yes, I needed the hit event to make it work and set the projectile to block. Thank you so much!

This is true,I tried it.awesome!but what should I do when I don’t want the parent class to have a sphere collision for the root?not all my bullet need collision…

if the projectile is only for visual fx then use a mesh or niagara etc.

Problem you will run into is the projectile will clip through everything. Without a collision as root to stop the movement on hit, then it clips.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.