Search Unity

C# roll cube over hills/objects

Discussion in 'Scripting' started by Calum_1015, May 29, 2017.

  1. Calum_1015

    Calum_1015

    Joined:
    Jan 31, 2016
    Posts:
    17
    Today I am requesting aide in search of a solution to a problem I have been working on solving for the past few weeks. The problem is that the player will clip through any hills and fall through the map. The movement script only works on perfectly flat land, and this is not ideal. The player can also not jump until they have completely stopped moving, which is also not ideal. You can see the look of the animation that I have achieved here, and my code here. I started by using just physics, and that resulted in a movement hard to explain, which did not look nice. An example of that can be found here.

    Any help is appreciated, thank you!