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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Chair Physic

Discussion in 'Physics' started by Milky_Games, Mar 7, 2023.

  1. Milky_Games

    Milky_Games

    Joined:
    Jan 25, 2023
    Posts:
    3
    Hi, so, i want to add physics to a chair in my 3d game. What i want is the player to walk into it and the chair moves and falls down. What I have is a physics material where the chair falls down on Void Start but when my player walks into it, the chair doesn't move nor fall over. If anyone sees this could you help me? Also, could you make it really easy to understand because I dont want really complex code since i'm new to unity. Thanks!
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    What components are on there?
    I suggest a rigidbody with multiple primitive colliders
     
  3. Milky_Games

    Milky_Games

    Joined:
    Jan 25, 2023
    Posts:
    3
    There is a rigidbody with gravity enabled and a box collider
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    Then if the player is a rigidbody and has a collider it should add physics. Maybe try to change the physics material of the chair.

    You can also use OnCollisionEnter to add extra force to the chair
     
  5. Milky_Games

    Milky_Games

    Joined:
    Jan 25, 2023
    Posts:
    3
    I got it working. Thank you so much!