How do I implement vehicle collision with spline mesh?

Hi guys!

Here again with another question. In my racing game I have a track made out of splines with a mesh that I made. What I want to do is simple(?). I am replicating F Zero game, and I want it so that when you collide/impact/crash with side walls you take damage (And reduce health).

How can I go and do this, so that depending of some variables (Speed, speed change, force of impact, direction of impact [Weather it was a front crash or side bump] or something else you propose) I can decrease health of car and thus explode it.

I’ve tried using event hit, but I can’t seem to be able to find a ‘Simulation generates Hit Events’ option for landscape splines. And even with a simple mesh (UE4 sphere) I couldn’t get it to spown a simple explosion to see if it was working.

Here is a screenshot of editor showing car blueprint and spline mesh (with collision visible)

http://puu.sh/aRC5D/3d4deb9546.jpg

Thanks!

Nope, still doesn’t work. I am using 4.4.1.

http://puu.sh/bsyYq/07601724c1.jpg

it won’t even collide with a mesh that is set to generate hit event.

http://puu.sh/bsz2j/01c842e9a9.jpg

This is latest blueprint scripting I have made. It should spawn out a simple explosion particle effect, just so I can see it’s detecting hits.

http://puu.sh/bsz7b/acf803b9af.png

Do you want me to share project or certain assets for you to test?

Sure thing! Would you kind me link me your forum profile so I can PM you or your email?

Hey Motanum,

I believe there was an issue in 4.3 in which certain collision settings did not work properly with landscape splines. Have you updated to 4.4, and are you still experiencing this issue?

If you feel comfortable zipping and posting your project folder somewhere, I can certainly take a look at it. If you want to send me a private link, you can PM me on forums.

https://forums.unrealengine.com/member.php?32--

Hey Motanum,

I apologize, I misinterpreted your question at first. It would seem spline meshes are not generating hit events, as you discovered already. I have asked our developers whether this is something we can work around and will let you know as soon as I hear back from them.

Oh ok, I see. Then how comes it won’t generate hit events with other static meshes in middle of track?

Hey Motanum,

After speaking with developers, it looks like problem is not with spline meshes but with skeletal mesh of car. For vehicles, you need to enable Simulation Generates Hit Events in both component details inside Blueprint and in each body of Physics Asset for vehicle. In your project, open SK_Car_PhysicsAsset and select CarBody from Hierarchy. Then in Details panel, enable Simulation Generates Hit Events in Collision section. You can also do this for Tire bodies, but that may not be what you want. Then Event Hit node should detect collision with chassis of car.

Hope that helps!

Love you man! This works now!