# Is there a way to mitigate penetration of heavy objects into light objects?

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-mitigate-penetration-of-heavy-objects-into-light-objects/479852>\
**Category:** World Creation\
**Tags:** Physics-Mass, unreal-engine, Physics, question\
**Created:** [March 6, 2021, 7:11pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-mitigate-penetration-of-heavy-objects-into-light-objects/479852 "2021-03-06T19:11:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [March 6, 2021, 7:11pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-mitigate-penetration-of-heavy-objects-into-light-objects/479852/1 "2021-03-06T19:11:05Z")

</div>

Two cubes simulate physics, and you can change their mass.

If you put a heavy cube onto the light one, it penetrates it: [here](https://drive.google.com/file/d/1dFkWOioCaEEx9Lr3YlWOaspPpi2NAjpn/view?usp=sharing)

Is there a way to mitigate this behavior somehow?

Thank you!

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 7, 2021, 8:59am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-mitigate-penetration-of-heavy-objects-into-light-objects/479852/2 "2021-03-07T08:59:50Z")

</div>

Have you played with CCD and iteration solvers - both should help here dramatically?

 ![331715-screenshot-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/8/2a8e7a10bb729b66eb3457d09705183edb9a475e.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 7, 2021, 9:03am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-mitigate-penetration-of-heavy-objects-into-light-objects/479852/3 "2021-03-07T09:03:06Z")

</div>

Also, is it safe to assume that _depenetration_ here is at default settings? This one controls the behaviour of intersecting geometry - how quickly it gets ejected should they overlap.

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [March 7, 2021, 2:19pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-mitigate-penetration-of-heavy-objects-into-light-objects/479852/4 "2021-03-07T14:19:48Z")

</div>

Hey, thank you for the reply.

Position Iteration Solver Count does help a bit. With higher values the penetration is not as prominent and it’s a lot better.

Is states that it’s CPU intensive; do you happen to know how intensive we’re talking about? If I set the Position Solver Iteration Count to 255 for 4-5 objects in the level, how much will it affect performance?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 8, 2021, 7:46am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-mitigate-penetration-of-heavy-objects-into-light-objects/479852/5 "2021-03-08T07:46:34Z")

</div>

I believe that only once I had to set it to 4 or so, not sure how setting it to 100 could work and the performance impact. Probably negligible for several actors.

On the other hand, ballpark of what values are we talking about? I’d be curious to replicate it just to see what makes it break.

1 cube is a kg and the other a ton?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 8, 2021, 9:35am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-mitigate-penetration-of-heavy-objects-into-light-objects/479852/6 "2021-03-08T09:35:56Z")

</div>

Yeah, it’s not particularly difficult to replicate:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/9/1f98981f90665c51b2d6475ce0968ac964f3eaa5.gif)](https://gyazo.com/fbefcf1735e57b86b085b3502b30dce8)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 8, 2021, 9:53am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-mitigate-penetration-of-heavy-objects-into-light-objects/479852/7 "2021-03-08T09:53:40Z")

</div>

FYI: I posted a potential solution but it got moderated. I might have used a name of an aquatic bird one time too many and the system _thinks_ I wanted another 4 letter word starts with an ‘f’ instead.

Anyway… try setting both solvers to 128 for the light object only. Seems to work for a 1:1000 ratio well enough.

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [March 8, 2021, 11:00am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-mitigate-penetration-of-heavy-objects-into-light-objects/479852/8 "2021-03-08T11:00:41Z")

</div>

Thank you, it will do the trick. In my case the minimum mass is 10 kg and the maximum is 20 tons, so it doesn’t negate the effect entirely, but does decrease it a lot.

Can you please convert any of your comments into an answer, so that I could mark the question as resolved?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 9, 2021, 2:24am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-mitigate-penetration-of-heavy-objects-into-light-objects/479852/9 "2021-03-09T02:24:20Z")

</div>

> I believe that only once I had to set  
> it to 4 or so

Because I never had to deal with stuff like this, apparently. For a 1:1000 mass ratio, this seems to work OK:

![331781-screenshot-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/8/908ecac70367fbecc8a7d08211daab5111093b00.jpeg)

and is only required for the light object:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/3/9/f3957e7644b4d68752ff1d88652b9ed6874b7e8f.gif)](https://gyazo.com/9aea11148be994512511ae237f010509)

Solvers below 100 seem like you’re successfully balancing an anvil atop a rubber duck 😑
