1
\$\begingroup\$

I am trying to simulate damages in cars using unreal engine when a body collides with it like it is done in this video - https://vimeo.com/162729920

I am trying to do it in the first person shooter game template, so that i can shoot projectiles at the object. but the object just moves and doesn't dent. I tried creating a destructible mesh but that cause the object to break down into pieces. I want it to dent when i apply a force to it. Could someone point me in the right direction?

\$\endgroup\$
  • \$\begingroup\$ just use a "damaged version" model.. doing it dynamic is sortof too involved if you have to ask \$\endgroup\$ – MickLH Mar 4 '17 at 3:56
  • \$\begingroup\$ We're trying to model the physics, so we can't use a damaged model. We need it to happen dynamically. \$\endgroup\$ – malreddysid Mar 4 '17 at 20:18
  • \$\begingroup\$ Research bullet's soft body physics. If it's not satisfactory then you'll want to survey some journal articles and weigh your options depending on what you need accuracy in. \$\endgroup\$ – MickLH Mar 4 '17 at 20:57
  • \$\begingroup\$ Try transforming the mesh by changing vertices positions. I don't know how to do that in UE4 but in Unity you can access Mesh and move its vertices to the position desired, for example. You will need to simulate force applied to every vertex based on an impact, then change their positions accordingly. \$\endgroup\$ – Candid Moon _Max_ May 6 '18 at 12:14
1
\$\begingroup\$

Softbody physics is definitely an option, although it requires a special engine build that contains Nvidia Flex (https://github.com/NvPhysX/UnrealEngine/tree/FleX - you will need to be allowed to view the UE4 github as well). But it's not the best option.

Another option is to use the Runtime Mesh Component plugin; when a projectile hits a vehicle part, a new mesh is dynamically created from the hit vehicle part, your code deforms the new mesh how you want, then it is shown on the vehicle.

Making your vehicle from multiple meshes that all have the same root position, lets you use either dynamically-deformed meshes OR predeformed static meshes. These two methods would be my suggestions.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.