Rigidbody falling trough terrain

Hello,

I hit the dead end when I tried to introduce different heights into my game. I created terrain and painted some hills on it. Then I created a capsule with Rigidbody component and attached Movement script which uses rb.MovePosition() function to move the rigidbody. When I create a few cubes and other obstacles it seems to work fine. But when I move around on terrain where is some slope, the player falls through the terrain and jumps above it periodically. I tried playing with different terrain settings and also with rigidbody settings on a player but nothing helped.

I created a package so it’s more obvious what I’m talking about.

https://github.com/vitvepav/RPGTestMovement

Issue can also be seen in this picture:
124829-unity-2018-09-19-15-35-07.png

This issue also happens on small slopes but here its more obvious.

Any advice is appreciated.

Thank you.

Thanks for your answer @theGreatSlutze , but I tried both things and the issue remains. I also tried different collision detection types (amongst a lot of other things), but no luck so far.

Couple of things you might try:

-Playing with the interpolation (interpolation-interpolate or interpolation-none) and seeing if either of those help

-Adding velocity to the rigidbody instead of using MovePosition. I think you’ll get more reliable physics simulations this way.