I have a projectile, which has a blueprint, which I am firing at an actor which also has a blueprint. Both have “Simulation Generates Hit Events” enabled and indeed I do see hits coming through.
However if the projectile hits the actor then whilst the Projectile get a “Event hit” through the actor does not. I do notice though that if the actor is hit by something else then it too gets the “Event Hit” through.
So I’m wondering:
- If 2 objects with “Event Hit” blue prints collide should they both receive that event?
- Or should any object with “Event Hit” in it route the event to the other object so they both recognise it?
Hey -
To answer your question the two objects should both trigger their own hit event. Depending on the behavior you need you can simulate physics on one of the objects or enable the sweep boolean on the movement node for the projectile. I have found that both of these ensure that the hit event is registered, however with the sweep option, the object will stop the projectile’s movement when the hit is detected.
Cheers
This is odd because the projectile bounces off the actor, so a collision is definitely registered in the PhysX system, yet the “Event hit” is never fired? I will enable “Sweep” and see if it makes a difference. Maybe it the actor fails to fire because I have I don’t have it “start awake” ?
Which of the objects (projectile or other actor) is receiving a hit event? Adding a print string node to each event with different text should make it clear which actor is receiving an event and which is not. Also ensure that the hit event for the projectile is set to the projectile’s collision component.
Cheers
Well I got to the bottom of it, or actually an artist got to the bottom of it.
What was happening was the collision geometry he had built, which was convex, was occluding the object I was trying to hit. When you look at objects in the editor they don’t show the collision geometry (or is there a way to view that?) and so we couldn’t see one object was in the other.
Fixing the collision geometry and now I get a hit registered every single time.