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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Joint break force and break torque?

Discussion in 'DOTS Physics' started by andyman404, Apr 26, 2020.

  1. andyman404

    andyman404

    Joined:
    Jul 27, 2013
    Posts:
    6
    Is there a way to set a DOTS Physics joint's break force and break torque? I've been playing around with the Unity Physics Package v0.3.2 but I don't see a way to set these. Am I missing something or is this feature not available yet? Is it a planned feature?

    Or is there a relatively efficient workaround for doing it through code?

    Scenario: I'm making destructible buildings composed of smaller building blocks (PhysicsBody, PhysicsShape), connected together by fixed joints in DOTS. I've been able to procedurally generate those buildings and joints successfully with DOTS and it performs well. Currently the buildings just sway like jello when they are hit, since the DOTS joints seem to have infinite break force/torque. If I only join a small percentage of the building blocks to their adjacent neighbors, nice organic crack lines appear when the building is hit, but they don't break off if they have any joints on them. (See attached gif)
     

    Attached Files:

  2. Adam-Mechtley

    Adam-Mechtley

    Unity Technologies

    Joined:
    Feb 5, 2007
    Posts:
    290
    Yes right now you would have to write a custom SimulationCallback to handle breaking on your own. We'll be adding built-in support for this in the near future but no specific ETA yet.