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

Bug Friction from the player is not detected

Discussion in 'Physics' started by MagicAme, Jul 12, 2023.

  1. MagicAme

    MagicAme

    Joined:
    Sep 7, 2021
    Posts:
    1
    Hi I have a problem with the player function; I am creating a typical jump and run game and the player is supposed to just fall off when he touches one side of the platform. But this does not work. To the capsule collider of the player I have placed a gravity material where all values are at zero and everything is at minimum. Yesterday everything worked as it should, but today it doesn't work at all. I didn't change anything in the code of the player's movement, I didn't change any general settings for gravity or any settings in general. What I only did today was to change the codes of the skins that has no effect on the physics of the player. For the platforms, there is a very normal Box Collider.
     

    Attached Files:

  2. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    449
    How doesn't it work? Please specify what you expect to happen and what actually happens.

    Gravity doesn't work with a material but via the Rigidbody component. Gravity force is set in Project Settings->Physics first parameter, and this will affect your rigidbodies according to their parameters.