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

Assign different Physics for each material?

Discussion in 'Physics' started by HeinzT0mat0, May 16, 2020.

  1. HeinzT0mat0

    HeinzT0mat0

    Joined:
    Jan 3, 2020
    Posts:
    7
    I have a gameObject that contains two different Materials. (Water and Earth). Now I want to both of these Materials to behave differently when another object falls onto them.

    What do I have to change to be able to assign a physics object to those materials?

    (I added a screenshot of the inspector to - hopefully - make my problem a bit clearer)
     

    Attached Files:

  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,623
    This could mean anything TBH.

    Not sure what you mean by a "physics object". The supported options for automatic behavioural changes is done using physics materials (3D).
     
  3. HeinzT0mat0

    HeinzT0mat0

    Joined:
    Jan 3, 2020
    Posts:
    7
    Thanks for your response

    Yes I meant physics materials which I already created.

    I can add that material to the Mesh Collider but then the physics is assigned to the whole GameObject. I want to assign it to the two materials of the mesh renderer instead. (each material having a different phyiscs, especially dynamic friction)
    But the Mesh renderer does not allow physics materials as elements
     
    Last edited: May 16, 2020
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,623
    GameObjects and renderers have nothing to do with physics interactions; they are for visuals only. A render material has nothing to do with physics materials.

    No, it's related to that Collider; the GameObject is just a container of components and is nothing to do with physics.
     
    HeinzT0mat0 likes this.