# Physics objects are falling through landscape

**URL:** <https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965>\
**Category:** World Creation\
**Tags:** bug, unreal-engine, Physics, Landscape, bug-report, question\
**Created:** [May 18, 2015, 3:43am UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965 "2015-05-18T03:43:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [May 18, 2015, 3:43am UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/1 "2015-05-18T03:43:44Z")

</div>

## Physics objects are falling through a landscape, if they are small enough.

_Cubes with a size of 50x50 never fall through the landscape, cubes with a size of 30x30 rarely do and cubes with a size of 10x10 almost always do._

* * *

**Repro Steps:**

1. Create a landscape.
2. Create an actor “Cube”, add a mesh and enable simulate physics
3. Create another actor “Cube Spawner” which spawns “Cube” in the tick
4. Place the “Cube Spawner” in the level
5. Hit play and take a look at below the landscape

* * *

This is not only happening on a landscape but also on static meshes with a Z thickness of near 0. The “collision thickness” setting of the landacape is not changing the behavior.

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [May 21, 2015, 9:36pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/2 "2015-05-21T21:36:42Z")

</div>

Hey ,

I’ve not been able to reproduce this using the 4.8 preview 3.

I’ve setup three cubes with the size dimensions you mention.  
Here is a video of my results: [https://www](https://www)…com/s/gujk7gz146poh9g/SpawnCollision.mp4?dl=0

With my cubes they are using a collision box for the setup. Are you using a collision box or have you enabled collision complexity to use “Complex as simple collision” (Per Poly)?

Tim

---

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [May 21, 2015, 9:49pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/3 "2015-05-21T21:49:10Z")

</div>

The mesh I use is the cube from the Engine Content at /Engine/BasicShapes. It’s using a collision box, I have not changed any of the collision settings.

The mesh is 100x100x100 size, so for 10x10 I spawn it with 0.1 scale. It looks like this:

[http://puu.sh/hVLr4/da23f2ba36.gif](http://puu.sh/hVLr4/da23f2ba36.gif)

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [May 22, 2015, 3:57pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/4 "2015-05-22T15:57:29Z")

</div>

Hey ,

Digging into this a little bit more this is actually not a bug, but just a way of handling collision in a performance happy method. There is a setting in for the static meshes collision that can be enabled that is CCD (Continuos Collision Detection).

When this is enabled it will increase CPU processing, but it will increase accuracy of collision for your spawned meshes. When I tested this in 4.7.6 and 4.8 p3 with this setting enabled there were none of the spawned cubes penetrating any longer.

If you hover over the CCD option in the details panel and hold Ctrl + Alt you will see an expanded explanation.

I hope this helps.

Tim

---

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [May 22, 2015, 4:01pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/5 "2015-05-22T16:01:06Z")

</div>

Hi Tim, thanks for looking into this!

I know that it works with CCD, but it’s just not an option for me because it’s too expensive, I can’t waste so much CPU time.

I think it is a bug, because if I have a static mesh with a thickness of lets say 50, no physics actors are falling through the landscape. But a landscape with a collision thickness of 50 acts as if the collision thickness would be 0, not 50.

If the actors are not falling through a static mesh with a Z thickness of 50 they should also not fall through a landscape with a collision thickness with 50, right?

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [May 27, 2015, 2:27pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/6 "2015-05-27T14:27:35Z")

</div>

Hi ,

I’ve submitted a ticket for Landscape Collision thickness to be investigated by one of the developers. Ticket UE-16195.

I’ll update you once there is any change with the ticket.

Thank you!

Tim

---

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [June 5, 2015, 3:48pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/7 "2015-06-05T15:48:35Z")

</div>

Seems like there is a fix! [https://github.com/EpicGames/UnrealEngine/commit/9c21d371dc72aab52fdfb67b1b508035abd72dd8](https://github.com/EpicGames/UnrealEngine/commit/9c21d371dc72aab52fdfb67b1b508035abd72dd8)  
Will this get added to 4.8?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_550b73f9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_550b73f9](https://forums.unrealengine.com/u/anonymous_user_550b73f9)\
**Post date:** [June 8, 2015, 9:11am UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/8 "2015-06-08T09:11:26Z")

</div>

Hi ,

Unfortunately it missed the cutoff for 4.8, but you can easily solve the problem by first changing the CollisionThickness property, then changing CollisionMipLevel to something other than 0, and then change CollisionMipLevel back to 0. That will regenerate the collision data (twice) with the new CollisionThickness.

-

---

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [June 25, 2015, 9:42pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/9 "2015-06-25T21:42:02Z")

</div>

Hi , thanks for letting me know!

I have tried to change the CollisionMipLevel to 1 and back to 0, but it does not seem to change anything. The physics objects (most of them) keep falling through the landscape the exact same way you see on the gif. I have set the landscape collision thickness to 500, so this should be thick enough I guess.

---

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [June 29, 2015, 7:00pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/10 "2015-06-29T19:00:02Z")

</div>

any idea why it does not work?

---

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [July 6, 2015, 4:05pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/11 "2015-07-06T16:05:56Z")

</div>

Why was this marked as resolved? If the changing of CollisionMipLevel does not update the physx collision thickness, the fix mentioned above will also not fix this bug.

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [July 6, 2015, 4:28pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/12 "2015-07-06T16:28:16Z")

</div>

The CL has been fixed internally with 4.9. The fix that suggested is a workaround and not the submitted fix.

---

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [July 6, 2015, 4:53pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/13 "2015-07-06T16:53:25Z")

</div>

I know, but I looked at the commit I linked and it only adds another condition to the if, before it was

```
else if (GIsEditor && (PropertyName == FName(TEXT("CollisionMipLevel"))))

```

and the fix changed it to

```
else if (GIsEditor && (PropertyName == FName(TEXT("CollisionMipLevel")) || PropertyName == FName(TEXT("CollisionThickness"))))

```

And as my test showed changing the CollisionMipLevel also does not fix it, so even with the fix it will not be fixed I think. “RecreateCollisionComponents” is called after I change the MipLevel but objects still fall through the landscape, so just calling “RecreateCollisionComponents” does not seem to help.  
Or is there another commit which is added to 4.9 to fix this?

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [July 16, 2015, 2:31pm UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/14 "2015-07-16T14:31:18Z")

</div>

The ticket for this has been re-opened and is being investigated further. I’ll post an update once a resolution has been found.

Thank you!

---

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [July 29, 2015, 5:33am UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/15 "2015-07-29T05:33:39Z")

</div>

Any update? I will try to see whether it’s fixed in 4.9 later, there is so much to test in the preview, if you could just say it has been fixed (with another commit) in 4.9 that would be great 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_afd92cec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_afd92cec](https://forums.unrealengine.com/u/anonymous_user_afd92cec)\
**Post date:** [July 29, 2015, 7:44am UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/16 "2015-07-29T07:44:23Z")

</div>

I’ve confirmed that Collision Thickness gets correctly propagated to physx heightfield objects when it’s changed. But it seems like it does not have any effect. Boxes still falling through heightfield. So it seems like bug in PhysX library. I would recommend to enable CCD while we talking with nVidia about this issue.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_550b73f9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_550b73f9](https://forums.unrealengine.com/u/anonymous_user_550b73f9)\
**Post date:** [August 3, 2015, 9:11am UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/17 "2015-08-03T09:11:27Z")

</div>

Hi ,

I’ve sent a PhysX visual debugger trace of your scene to Nvidia for their opinion as to whether the heightfield thickness support should be expected to cope with this situation and if they have anything we should try changing. I can see in the PhysX debugger that we are correctly setting the thickness when we send the data to PhysX.

We only have a few primitive types to choose from when creating physics objects inside PhysX. Static meshes are typically able to use convex collision type which has much better behavior than heightfield (which we use for landscape) or triangle mesh primitives because they are much easier for the physics engine to handle.

Cheers

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_550b73f9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_550b73f9](https://forums.unrealengine.com/u/anonymous_user_550b73f9)\
**Post date:** [August 3, 2015, 10:47am UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/18 "2015-08-03T10:47:12Z")

</div>

Hi ,

I got a reply from Nvidia. The problem is we have enabled Unified Heightfields in PhysX which improve general collision behavior (especially interaction with neighboring triangle meshes) but they do not support the thickness parameter so as you mention, it’s being ignored.

It’s a single line change in the engine, PhysLevel.cpp replacing PxRegisterUnifiedHeightFields with PxRegisterHeightFields and thickness works as expected

 ![52554-nonunifiedheightfields.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/2/fd2c18da42a084c67cd885342bd71d3dd897cea5.jpeg)

I will add a flag to make the choice of which PhysX heightfield system to use an ini file option for version 4.9.

Cheers

---

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [August 4, 2015, 3:02am UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/19 "2015-08-04T03:02:17Z")

</div>

That’s awesome, thanks a lot! 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_550b73f9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_550b73f9](https://forums.unrealengine.com/u/anonymous_user_550b73f9)\
**Post date:** [August 4, 2015, 3:04am UTC](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965/20 "2015-08-04T03:04:10Z")

</div>

Hi ,

For 4.9 I added a new p.bUseUnifiedHeightfield console variable to enable disabling of unified heightfields.

Setting p.bUseUnifiedHeightfield=0 in your ConsoleVariables.ini will allow the thickness parameter to work.

The fix is here if you want to apply it sooner:

[https://github.com/EpicGames/UnrealEngine/commit/0cb71100dc9dc5a38d1fb4415764136997f23bb5](https://github.com/EpicGames/UnrealEngine/commit/0cb71100dc9dc5a38d1fb4415764136997f23bb5)

-

[Next page](https://forums.unrealengine.com/t/physics-objects-are-falling-through-landscape/318965.md?page=2)
