Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Joint break force and break torque?

Discussion in 'Physics for ECS' 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

    Administrator

    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.