Download

Death on collision with terrain?

Hello,

I have just started on the Unreal engine to create an aerial dogfighting game. One of the features I am trying to implement is a feature that kills your plane upon collision with the terrain and respawns you after 5 seconds. I have figured out how to map the controls and the plane is flying how I want it to.

I used the Flying template to start off.

In your plane actors search for “Event Hit”. From there you can get information like where it hit, what component/actor it hit etc.

hit event also give you “normal impulse” wich is a vector of wich you can get the length. the returned float value represent the velocity of the hit. you could also use the value to destroy the plane if it hit anything hard enough :slight_smile: of course wathever you want to be able to trigger that event must have “simulation generate hit event” set to true, I believe. That would allow you to destroy the plane if it fly into another plane or a building for example.