Download

Collision problems

Hi, I’m having a problem with collision.
I have a terrain, with parts of it covered in complex collision geo to trigger different walking sounds. The collision geo is extruded, and extends below and above the terrain. I have an on overlap event and an end overlap event in a blueprint which contains the collision geo.
When I walk through it, the overlap and end overlap keep triggering alternately. I tested it with a print string, this can happen a few times a second.
In the mesh editor I have my collision mesh set to use complex as simple, and trigger set. In the details panel for the same mesh/blueprint in the main editor I have generate overlap events set and trigger, and I have also tried overlap all and overlap all dynamic. I’ve also tried this in the details panel in the blueprint for the mesh, setting both on(the main editor and the blueprint editor), just one, trigger, overlap all dynamic and overlap all. The player character has normal settings, although I tried continuous collision. I read somewhere that the player character (I’m using the first person template) can have multiple colliders, like the projectile, the mesh, the capsule, so I tried turning off collision for everything but the capsule, and then deleting everything but the capsule, with no luck. I tried making the capsule really tall, so it’s always cutting through the top of the collision mesh, and really short so it’s always inside the mesh.
I thought maybe the geo wasn’t water tight, so I turned it into a volume in Houdini and then back to polys.
I deleted the firstperson blueprints folder entirely, and pasted in another one from a different project. This worked for a day, and then it whent back to the same thing, only worse.
I tried downloading the latest nvidia game ready driver, and the studio driver.
I don’t want to upgrade UE4 because my current project is all in this version.
Does any one have any ideas?

I’m using version 4.22.1
Here is the blueprint which contains the collision geo:

](filedata/fetch?id=1801762&d=1597637516)
and here are my settings:
](filedata/fetch?id=1801764&d=1597637655)

Collision can be tricky at times.

However, this is a very difficult way to make footstep sounds.

Most common way is with a downward line trace to pickup the material, which can be mapped to elements to make sounds in the project settings.

Another easy way, which I prefer because it can be much more subtle, is to just make a BP volume. As the player intersects with the volume, you can play selected sounds based on the blueprint parameters and the velocity of the player.

Thanks for the quick response.
Yeah, I’m aware of physics materials if that’s what you mean. My terrain is all one material unfortunately, and I feel like I have more control this way.
As to your second suggestion, that’s what I thought I was doing, only I’m not using a volume I’m using custom geo.
And I would like to solve this collision issue, even if it’s not for audio, collision has been a big part of my projects.

If the collision is tied to the characters feet, maybe, they get too high while walking, producing the on/off triggering effect.

If you are using volumes - which mind you it isn’t a bad idea. I would suggest a more standardize approach that doesn’t rely on collision and still uses the animation notify.

Basically, make a tall (so jump is also kept 100% into the) volume. Inside an actor perhaps so you can place it about and control different BSP or collisions within it.
(there is a limit to actors in scene btw, so 1 actor that contains it all is better than 1000 actors).

within the actor, detect overlap between Pawn - default capsule component and the Geom type in question (suggestion you can use the instanced static mesh components to build custom geom at reduced costs even if you are just using it as a trigger and it isn’t rendered).

save the actor that’s overlap and check on end overlap if the same actor is the one thats got out of the volume.
(note: you can review the adv. Render target water custom example for somewhat clean BP code).

While the overlap is active, simply tell the actor to use sound X instead of sound Y.
you can do this many ways, I would probably use a BP interface so that I can always force the sound to change.
the trigger is done along with the overlap start, so any time an area change occurs a new foot sound would he used.

Does that make sense?

Hi, thanks. Not sure I understood that much, I’m a noob here. I didn’t want to use volumes though because they only seem to come in one shape, and I wanted my shapes to fit the terrain.
I did try and print out the name of the overlapping actor - it was always just firstPersonCharacter_C_1.
I got it working, although it keeps triggering multiple times a second, but it doesn’t matter too much because the fade in and out timelines smooth it out.
I found out my keys weren’t triggering which might have made it worse, and had to set them not to “consume”. Also enabling input might have helped.
Here is the finished BP if anyone’s interested. I had to use an event at the start of each timeline to stop the other one - the figure of 8, other wise it sounded weird.

](filedata/fetch?id=1802318&d=1597753038)

Even if you have the most rugged and mountainous terrain, one big volume will fit over everything. You only have to know if the player is passing through the volume, it doesn’t matter where they are in the volume.

Also, collision if not a neat thing. It triggers, sometimes, many times a second, and it’s best to take that into account in your blueprinting :slight_smile:

Ok, good to know. The reason I wanted custom shapes was because my terrain had roads and fields and water that I wanted to map to the sound. A box wouldn’t work.