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

Convert Game Object To Entity - Rigidbody

Discussion in 'Entity Component System' started by InAngel, Mar 25, 2020.

  1. InAngel

    InAngel

    Joined:
    Dec 30, 2017
    Posts:
    33
    hello everyone,
    I am using convert to entity and the rigidbody constraints aren't working.
    So my question is what is the best way to make the same effect in code (the code is without burst if it helps)?
    Thank you in advance.
     
  2. hobohak

    hobohak

    Joined:
    Mar 2, 2020
    Posts:
    6
    Use the Physisc Package which supports ECS.
    - Physics Shape & Physisc Body are probably the components you would want

    upload_2020-3-28_3-16-37.png
     
  3. InAngel

    InAngel

    Joined:
    Dec 30, 2017
    Posts:
    33
    I can use these two but they also don't have constraints, so if i need a sphere colider then the spear will fall over when i give it velocity from input.
     
  4. hobohak

    hobohak

    Joined:
    Mar 2, 2020
    Posts:
    6
    Hi @InAngel, have a look at the 4b. Limit DOF example in the physics sample projects.