# \[Please Dearly Consider\] Exposing Runtime/LandscapeDataAccess.h To Shipping Builds

**URL:** <https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 12, 2014, 12:43am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657 "2014-06-12T00:43:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [June 12, 2014, 12:43am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/1 "2014-06-12T00:43:07Z")

</div>

Dear Friends at Epic,

To work around the landscape collision bugs that still have not been resolved I used Landscape Data Interface to add collision triangles where they were needed, along sloped terrain sections.

You can see videos and even see the source code for my plugin here:

> **[\[Videos\] Rama's Victory Landscape Collision Plugin](https://forums.unrealengine.com/showthread.php?9215-Videos--s-Victory-Landscape-Collision-Plugin)**
>
> Dear Community, I’ve been having problems with my landscape collision ever since Physx3.3 was introduced sometime during the Beta. I have been struggling with the issue ever since because I cannot release my game until this issue is resolved! ...

My system relies on LandscapeDataAccess.h, which is entirely wrapped in a IF WITH EDITOR

My packaging process failed because of this.

* * *

**LandscapeDataAccess is indeed located in the Runtime section though!**

* * *

#Request

Could you consider exposing LandscapeDataAccess.h to shipping builds since the proper solution for the Physx 3.3 landscape collision issues has not been found yet?

I have a solution that works for me but I can’t use it without LandscapeDataAcess.h

**I can’t ship my game without a proper solution for Landscape collision Physx 3.3 issues!**

Thanks for considering this!

---

<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 13, 2014, 2:02am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/2 "2014-06-13T02:02:16Z")

</div>

Hi ,

As you’re probably aware, enabling LandscapeDataAcess.h in Shipping builds is a bit problematic because it drags in a lot of editor-only functionality such as texture source data that really shouldn’t be in Shipping builds (for size reasons).

I do have plans enable landscape data deformation at runtime (and by blueprints), so obviously I will need to find a solution to these issues. But until then I do have a couple of other suggestions that I can give you now:

At runtime you do have access to the RBHeightfield which is actually just the height data used by PhysX. You can extract that data to get pretty much exactly what you’re getting out of the texture with LandscapeDataAccess. The realtime navigation mesh generation code uses this. Have a look at the ExportPxHeightField function in Engine\Private\AI\Navigation\RecastNavMeshGenerator.cpp which extracts the data. This is called from the ULandscapeHeightfieldCollisionComponent::DoCustomNavigableGeometryExport function.

You could write a similar function that extracts the triangle data you need out of the RBHeightfield stored in the collision component.

An alternative you might like to consider to work around this problem, would be to add a function at cook time which converts the ULandscapeHeightfieldCollisionComponents to ULandscapeMeshCollisionComponents. These are slightly bigger memory-wise but there would be no runtime cost.

Cheers

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [June 13, 2014, 8:22am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/3 "2014-06-13T08:22:40Z")

</div>

“I do have plans enable landscape data deformation at runtime (and by blueprints), so obviously I will need to find a solution to these issues”

Oooh that is going to be awesome!

I want runtime landscape deformation so much!

Thank you for working on this Porter!

🙂

And thanks for all your helpful suggestions!

I have copy-pasted your message to my notes files and will work on this!

#Thank You Porter!

#❤

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [June 13, 2014, 10:01pm UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/4 "2014-06-13T22:01:42Z")

</div>

Dear ,

You mentioned in your very nice forum post that you have trouble reproducing the landscape collision bug, and I agree, as I shared in the post.

But I can easily and reliably reproduce the bug in my main project, so if you’d like my entire project to aid your debugging let me know!

#❤

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [June 15, 2014, 5:44am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/5 "2014-06-15T05:44:34Z")

</div>

Dear ,

I have made a new project in 4.2 and I am able to reproduce the landscape collision bug very reliably.

I also have proven that my plugin method does not work because the dynamic mesh collision is not getting cooked.

So I officially dont have a solution for the landscape collision issue aside from getting further details on what you’ve recommended in this thread

```auto

**Project Available For You**

I can give you the packaged and unpackaged version of my new project, which packages quite fast, if you would like a complete example project that can reproduce the bug reliably!
```

---

<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 16, 2014, 2:33am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/6 "2014-06-16T02:33:26Z")

</div>

Hi ,

It would be great to have the 4.2 project that reliably reproduces the problem.  
If you want you can send me a link or you can upload it to our write-only FTP server:

user:  
pass:

Thanks

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [June 16, 2014, 7:44am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/7 "2014-06-16T07:44:31Z")

</div>

#My Project for You

Dear ,

I am uploading my project to the drop box you mentioned above

**ForJackPorter\_JoyShapes\_FromRama2.rar**

the first attempt can be deleted 🙂

#Expected File Size

Total file size should be:

**1.03 GB**

**1,107,251,319 bytes**

#Important ~ Char Mesh ~ File 2

I didn’t finish zipping apparently, to see the character mesh you need this additional Content .rar

**ForJackP\_TheCharacterMesh\_FromRama**

It is already done uploading

File size:

**750,141 bytes**

#Time Done

Upload should be finished within 4 hours of me sending you this message.

#Source

I’ve included my source and .sln so you can rebuild the project entirely if you want 🙂

#Running

I left a .bat file that you can run if you edit it to point to your 4.2-Release engine.

#In-game Note

I left you an in-game note!

I point you to a great spot to test!

#Testing

Just jumping around on the slope I’ve pointed out leads me to reliable falling through within about 1-3 attempts

#Character

It is a simple skeletal mesh with a simple collision capsule, all default settings from Third Person C++ template.

I am not doing anything fancy in the C++ regarding the character movement or collision

All the c++ is actually for the UI and camera at the moment

#Verifying

I’ve re-unzipped this project to an external hard drive and can verify that it will run if you simply set the .bat file to point to your engine

I’ve also verified falling thru the landscape more than 5 times using the version I am sending you, you just jump around on the slope I pointed out to you and it should not take long, especially at certain spots where it is steeper.

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [June 16, 2014, 7:56am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/8 "2014-06-16T07:56:31Z")

</div>

#Good Luck!

Good luck , keep me posted on your discoveries!

#❤

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [June 18, 2014, 6:57am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/9 "2014-06-18T06:57:07Z")

</div>

Dear ,

Did my project transfer correctly? Where you able to open it?

Have fun today!

---

<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 19, 2014, 6:08am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/10 "2014-06-19T06:08:23Z")

</div>

Hi ,

I was able to download all your content and open your project.

The game code had some problems with FBox and some header rearrangement we’ve done recently but I’ll hack it enough to get it loading.

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:** [June 19, 2014, 6:42am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/11 "2014-06-19T06:42:31Z")

</div>

I was able to get it running easily. I was easily able to fly through the landscape right where your text component indicated, so this should be much easier to track down.

About the source - for FBox2D, you don’t need to access Min and Max directly, instead you can use Box[0] and Box[1] respectively. We also recently changed the headers so less stuff is included automatically, so I had to add a few more include files - heads up for when you get 4.3.

With some luck, hopefully I can get a fix for the landscape collision included in it.

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [June 19, 2014, 11:21pm UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/12 "2014-06-19T23:21:16Z")

</div>

_"About the source - for FBox2D, you don’t need to access Min and Max directly, instead you can use Box[0] and Box[1] "_

Ooh nice, thanks for the tip!

I was actually the one who submitted FBox2D to the engine via GitHub ( at James G’s request) 🙂

**So I hope you are enjoying it!**

* * *

> “We also recently changed the headers  
> so less stuff is included  
> automatically, so I had to add a few  
> more include files - heads up for when  
> you get 4.3.”

Any chance you can tell me what those headers are so I can prepare in advance? It took me a long time to convert my main project to comply with 4.2 Thanks !

* * *

> “With some luck, hopefully I can get a  
> fix for the landscape collision  
> included in it.”

#Pleaaase Thank you P!

---

<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 24, 2014, 9:48am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/13 "2014-06-24T09:48:03Z")

</div>

To give you an update - the problem seems to be highly framerate dependent, with higher framerates cause it to happen more. It’s harder to reproduce in debug builds which are generally slower.

If you launch the game with -UseFixedTimeStep, it will tell the physics system you’re running at 30 fps regardless of the real frame rate. With that option, you can see it’s much harder to make the problem occur.

I’m still trying to work out what to do about it, but it gives us something to go on.

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [June 24, 2014, 2:02pm UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/14 "2014-06-24T14:02:13Z")

</div>

#Woohoo! P is near to Victory!

I can happily verify that I had the same experience you describe !

I tried your suggestion and I literally got bored of trying to get the character to fall through the landscape! I could not get it to happen once!

Woohoo!

You are on to something !

I am wishing you every success!

#❤

---

<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 25, 2014, 10:42am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/15 "2014-06-25T10:42:36Z")

</div>

Hi ,

I have a fix for the landscape collision issue.

Please replace the entire ConvertOverlappedShapeToImpactHit function in  
Engine/Source/Runtime/Engine/Private/Collision/CollisionConversions.cpp with the contents of this text file (two functions). This fix will be included in 4.3.

Basically the problem is when you begin to get embedded in an object, PhysX needs to be told how to push you out again. There was special code to calculate the best direction to push out for triangle meshes, but none for heightfields. I added the same kind of handling for heightfields.

(I can’t take the credit as one of our engine programmers, Zak Middleton pointed me in the right direction)

Please confirm this fixes the problem for you 🙂

Cheers

link text

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [June 25, 2014, 12:53pm UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/16 "2014-06-25T12:53:39Z")

</div>

# Porter You Are Victorious!!

It wooorkkkeed!!!

It woooorks!!!

I’ve tested my two different projects that experiences the issue and 3 different characters, one who has a positively tiny collision capsule!

They all work!

#It wooorks!

# P!!!

Rainbow for You!

 ![2537-rainbow.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/4/674bf3af67a4e578d2f06f299028ffb6d594119d.jpeg)

#Zak Middleton!

Rainbow for you for helping out!

 ![2537-rainbow.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/4/674bf3af67a4e578d2f06f299028ffb6d594119d.jpeg)

# P!

Another Rainbow for you for finding the solution to this issue! It makes perfect sense in hindsight, it is the perfect and Beautiful solution!

 ![2537-rainbow.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/4/674bf3af67a4e578d2f06f299028ffb6d594119d.jpeg)

#Victory to You P!

#❤

PS: I am going to go spread the news of your Victory! 🙂

PSS: Epic, P deserves special rewards for this!!!

---

<div class="post-metadata">

**Author:** ![Guy\_Paddock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Guy\_Paddock](https://forums.unrealengine.com/u/Guy_Paddock)\
**Post date:** [March 2, 2015, 4:11pm UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/17 "2015-03-02T16:11:25Z")

</div>

This is back in 4.7.1…

---

<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:** [March 2, 2015, 6:39pm UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/18 "2015-03-02T18:39:26Z")

</div>

Hi Guy, sorry to hear you’re seeing issues with collision in 4.7.1.  
This old thread you replied to is very confusing and contains a lot of old information, and the specific issue it was discussing has been resolved.

Could you please post a new question describing what you’re seeing in 4.7.1, and I’ll take a look.

Thanks

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [March 3, 2015, 9:24am UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/19 "2015-03-03T09:24:58Z")

</div>

Great to hear from you !

Thank you for Landscapes!

I hope dynamic height map changes in packaged builds are still in the works!

Have fun today!

#❤

---

<div class="post-metadata">

**Author:** ![Justice777](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Justice777](https://forums.unrealengine.com/u/Justice777)\
**Post date:** [December 27, 2017, 5:07pm UTC](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657/20 "2017-12-27T17:07:47Z")

</div>

Still an issue in 4.18.2

[Next page](https://forums.unrealengine.com/t/please-dearly-consider-exposing-runtime-landscapedataaccess-h-to-shipping-builds/285657.md?page=2)
