Static Mesh doesn't trigger OnHit

Hey,

I have a pretty basic but specific question that I can’t seem to find the answer for. I’ve got a Blueprint containing a static Cube mesh, BlockAll collision without Physics Simulation enabled, for one of my levels. The entire floor is padded with them.

I’ve got it scripted up to have an effect once the player hits it, but it only seems to work when the player jumps on it. When he walks on it directly, the OnHit event does not trigger. Does this sound at all familiar? Am I missing a basic step here?

I’m new to unreal my self, but I’ll still take a swing at this. My guess is that is has something to do with either the block all selection or some sort of displacement that occurs as a result of jumping (eg. if for walking the Actor’s distance above ground is fixed.

But, here is a note from Block in the documentation: “If the other Physics Body is set to Block this Physics Body’s Object Type, a Hit Event can occur.” Is the actor’s physics body set to block?

Hey mate. No worries, I started out myself a few days ago, thanks for the aid. I have a PlayerStart in the scene. I haven’t extended the PlayerController, so it’s using the stock class for it. Where do I find the actor’s physics body ?

Ok don’t quote me on this because I’m not entirely certain but that does sound like something that might be intended behavior.

The Event Hit is meant to allow you to do something if two objects collide. Triggering it every frame because you stand on a ground sounds like a giant waste of resources and not at all like what you’d want to have happen under normal circumstances. At least that’s how I see it.

Not triggering that event when changing the surface you’re walking on while nothing else changed seems like a sensible thing to do.

What you could do and what certainly will work is trace downwards continuously and check what surface you have there. Or add a collision box to those blocks to detect when you overlap those.

This is speculation on my part but walking doesn’t really seem like a “Hit the ground” type of thing so it might actually be intended.

What you say does make sense… I guess it’s easy to test by just seeing if walking against the side of said tile (which would definitely be an ‘interesting’ event) does trigger it.

I did consider the approach of adding a collision box, but the less complicated my Blueprints are as a beginner, the better. Still, might be the way I have to go.

Make those effects part of the animation much the same way you would add footstep sounds using markers in the animation, just play your sprites when the sounds are played.

I know this a year old but…