Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Character Walking Through Terrain Slopes

Discussion in 'Editor & General Support' started by girlinorbit, Sep 16, 2020.

  1. girlinorbit

    girlinorbit

    Joined:
    Apr 27, 2019
    Posts:
    114
    I'm trying to keep my player from walking up the slopes, but instead of stopping, the player just walks right through it. The terrain has a terrain collider and the player has a rigidbody and a box collider which surrounds it completely. Is there something else that I need?
     
  2. ibbybn

    ibbybn

    Joined:
    Jan 6, 2017
    Posts:
    193
    Things to try:
    Check if the rigidbody is set non kinematic.
    Check that the box collider is not a trigger.
    Check in Edit/Project Settings/Physics/Layer Collision Matrix that the terrain and player layers are set to layers which collide.
     
  3. girlinorbit

    girlinorbit

    Joined:
    Apr 27, 2019
    Posts:
    114
    Everything's good there. Any more ideas?