Event Hit - Normal Impulse is always zero

Brand new to UE4. I’m listening with an “Event Hit” node for collisions between my Actor and the player character. The event fires when the player jumps and lands on the actor, but the normal impulse vector is always (0, 0, 0). Could this be a collision configuration issue or is there some type of mass assignment I need to do?

2 Likes

Did you ever figure this out?

Hi everyone,

Can you post a screenshot of what your nodes look like? I might be able to see what is happening and how to address it. Thank you!

If you bump a character into a physics actor, the EventHit node on the physics actor will have a NormalImpulse of 0,0,0.

The only node you need is EventHit.

Hi ,

The question is what are you running off of the event hit to test the normal impulse? Can I see how you have it set up so I might be able to figure out what is occurring?

You can give this a shot.

Thanks

/

Hi ,

I think what you are looking for is the impact normal. If you are wanting to register the exact location that the player hit, use the impact normal and it should return the values you are looking for.

I’m actually trying to get the normal impulse because i need the force of the impact.

But It seems to be giving us some results now. Not sure what we did but it works now anyway.

Thanks

/

Actually this still doesn’t work. A Capsule driven by a CharacterMovementComponent will generate hit events without any NormalImpulse

Can you show me how you are calculating the normal impulse? Perhaps I can see a way in which you can see what you are looking for.

Something like this is what we’re trying to do.

Run a print string and plug the normal impulse directly into that. Does this register anything other than 0,0,0?

Yes it’s always zero.

Hey everyone,

We were able to reproduce this issue on our end and have entered a bug report, TTP# 348357 to be assessed by the development staff.

Cheers

Make sure "simulation generates hit event " is activated, of course simulate physics already have to be active too.

17082-help_01.png

1 Like

Hi all,

This is returning 0 right now because the character controller is not actually simulated. We’re talking about the best way to solve this in a general way so that we give you a reliable impulse. It gets a little complicated when you consider all cases.

However, for your case specifically you could manually compute the impulse by calling GetVelocity on the actor that’s moving and multiply it by its mass which you can get by calling GetMass.

Hope that helps, let me know if you run into more issues. Hopefully we’ll get a proper solution soon

1 Like

I am using a character blueprint so I cant use the normal impulse pin but if I were to make my own how would you deal more damage on direct impacts, ie traveling towards a wall at 90 degrees to the wall would do more damage than doing a glancing hit?

what would you multiply the velocity by to make it do more damage on direct hits and less if you hit something at an angle?

is there a node for this?

I have worked out how to do what I asked originally, if anyone is interested.

so if you want to get a realistic collision force for damage you might want to multiply by the mass if you have objects of different sizes but more importantly you can multiply the velocity by the impact normal and get the length of that so for example in a car game you would take more damage from hitting a wall you are driving towards than if you glance off a wall running almost parallel to the direction you are travelling.

The dot product of the Hit Normal and your character’s velocity will give you a number between your characters Speed and 0. That should do it.