Character Terrain Problem

iop 4 months ago in Game Creator updated 3 months ago 16


I found out a strange behaviour when using a character that should stand on an object above a terrain.

Here is the starting situation. Just a normal cube, a character and a terrain object. All values remain default in this test.

I also added the settings of the terrain and the cube at the end of the post:

If you press play now the character sinks into the cube like on this image (cube position y: 0.0):

If you remove the terrain and leave everything else the same this happens- the character stand on the cube correctly:

The same happens if the distance between the cube and the terrain is higher (cube position y: 0.4):

Do I something wrong here or is it a (known) bug?

Just as mentioned before the settings for the terrain and the cube (everything standard values):

Thanks for your answers!

Unity version:
Game Creator version:
Under review

I'm not sure this is a Game Creator bug. Could you update your Unity version? Game Creator doesn't really do anything that could be causing this, although I may be missing something. Seems more likely the collision of the cube is not being registered for being too close to the terrain, but still, that's very strange

I updated unity to the latest version 2019.3.13f1 now and it is still the same problem as before :(

Do you encountered the same problem when you recreate the scene?

An additional information I found out. If you remove the cube and then add a cube with exactly the same values the character doesnt sink into it :$ (no idea why)

(I saw this problem in a game, I'm trying to make at the moment. There is a house on the terrain. When the character enters the house he sinks into the floor of the house. I removed everything from the scene and finally found this bug..., if I cant find a solution for this it will be allmost impossible to find a workaround for my game)

It maybe something to do with IK, take a look at this video


Thx for posting the link to the video! But im not using any custom animation for this test. Im using the standard untouched character.

I had this problem with a custom animation for my character and find the solution with the offset by myself. But sill there is an interessting information in the video considering the foot IK values which I could need in the future perhaps.

Could anyone try out the scene if he encounters the same problem? It is very strange if you play around with the object values - results can change very fast ^^

I want to add some important information!

I reported this as a bug to the unity team. They checked it and I got the following answer:


Thanks for reporting the issue.

This issue doesn't reproduce when using only Unity Physics. After some testing with Game Creator asset, I noticed that this issue only reproduces when the character uses Character Animator component. I would suggest once more to write to the creators of Game Creator asset and report the issue.

If you need some more help don't be afraid to let us know!



Wow you got an answer from Unity and they even tested it with GC !! WOW !!

You must have a magic touch.

So, now Marti knows where to look to solve that problem

Well done iop 

Hmm I'm not sure the Character Animator has something to do with terrain collision. I'm opening a ticket to test this personally, but the Character Animator basically deals with animations.

Still, I'll test this out!


I also tested to remove the Character Animator as described. And after removing it, the character doesnt sink into the cube anymore. Thanks a lot for testing and trying to fix the problem!

Thanks a lot for trying to solve the problem! Is there a chance that u can predict approximately

how long it will take to find a solution? 

I couldn't say. I'm currently working on the Traverse module. However, I will soon update the core module because there are some changes I need to make first. I'll take this chance to go over the list of fixes and updates, including this problem. If I had to throw a guess... I don't know. Less than a month? But don't take my word though.


To hazard a guess, I believe this can be an issue with foot IK raycast sorting. When both surfaces are close enough to be hit by the foot IK raycast, it's not always the top one that takes priority, and this makes the feet sink into the ground when being aligned to the lower surface.

Looks like it. I'll dig this direction first. Thanks!

I've been taking a look at this issue and is quite strange. It seems it's not a problem with IK, as initially suspected. The character model (the first child of the player character) changes its height when climbing on top of the cube, whereas it goes back to its initial local position (0,0,0) when standing on the floor. To top this off, if the cube is then slightly elevated, the character automatically corrects its Y position and works fine.

It's a very marginal use-case. I'm still going to take a look, but I want to prioritize other more critical bugs, so this will most likely not be fixed in the next iteration, unless another issue reveals the cause of this. Despite this, I'll take a more thorough look later on.

Maybe as a workaround, you can set your house on a flat cube, and then on the terrain, instead of house directly on the terrain, Almost like a real house would sit on a foundation slab.  

You could even give it a concrete texture, so it appears you just added slabs for realism instead of a mechanic workaround.