Adding Physics to static object

Discussion in 'World Editor' started by el_ferrito, Nov 8, 2023.

  1. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    484
    I'm having a brain fade. I know I've done this before now, but I can't seem to add physics to my imported object.

    I have a hedge model that I've made (well... downloaded and modified):

    upload_2023-11-8_16-30-2.png

    And I want it to be soft when crashed into, not hard.

    It has a cube-box collision mesh, same shape as the bush, but without the detail.

    I've tried changing the ground type in the material for the bush leaves to snow/shock absorber, and that did nothing. I tried adding a material to the collision mesh, and changing the ground type on that to a soft variant too and that did nothing.

    I know I'm being daft... anyone remember how to do this?

    I definitely once had hay bales (not vehicle ones, but objects) which were bouncy when I crashed into them, so I know this can be done.
     
  2. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,459
    Try adding a groundDepth value to the material used for the collision in the JSON:
    Code:
      "leaves_thin": {
        "name": "leaves_thin",
        "mapTo": "leaves_thin",
        "class": "Material",
        "persistentId": "b3338585-c70d-4a6e-86fe-a0a33a496a25",
        "Stages": [
          {},
          {},
          {},
          {}
        ],
        "groundDepth": 0.800000012,
        "groundType": "leaves_thin"
      },
     
    • Like Like x 2
  3. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    484
    Thanks! Worked a treat. It definitely isn't what I did in the past, because I've never heard of this approach, but it works, and that is all I needed.

    Cheers.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice