Advertisement

Destructible enemies in UE4

Started by October 11, 2019 04:55 PM
1 comment, last by Wyrframe 5 years, 1 month ago

Hello everyone! I've decided to implement a destructible enemies system.
 

Description:

When bullet hit enemy in specific part of his body(arm fo example) armour, which covers that part of body, will fall off. Enemies in my game are robots so this means that when shooting them certain plates of their armour will fall off. All enemies will have a different amount of armour plates

 

My solution: 

The only solution I came up with is to make an actor with a static mesh and attach it to the bones of enemy's skeletal mesh. When bullet hit that actor it detaches and fly away with add impulse node.

 

Question: 

Maybe there is a better solution, which I'm missing and it's more efficient. 

That is a plausible solution. Try it, and see if it's performant enough for you.

If you're worried about efficiency... which kind of efficiency are you worried about? Mesh count? Configuration ease? Ability to dynamically create enemies of various kinds?

You also don't need to use the same type of actor for all situations. Having an "attached armour piece" actor with a mesh while it's on-bone, which deletes itself and creates in its place a "detached armour piece" actor using the same mesh, so that you can decouple or even parameterize the two sets of behaviours independently, is a perfectly legitimate strategy.

RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.

This topic is closed to new replies.

Advertisement