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. Dismiss Notice

Multiple joint collision setup

Discussion in 'Physics for ECS' started by snacktime, Jul 9, 2020.

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    So collider A and B are attached with a fixed joint. A and C are also attached with a fixed joint.

    None of these should collide with each other.

    A is a boat hull, B is the body, C is an avoidance collider, a scaled cylinder that envelopes A and B.

    A is the body force is applied to. It has a mass of 10k B and C have a mass of 1.

    Actually C isn't in quite yet I'm assuming if I attach like outlined above C is going to collide with B which wouldn't work out well.
     
  2. Adam-Mechtley

    Adam-Mechtley

    Unity Technologies

    Joined:
    Feb 5, 2007
    Posts:
    290
    You have a few options atm depending how you want to handle it, how many ships you have, how you spawn them, etc. I would advise either:
    • Use GroupIndex on CollisionFilter (no authoring workflow atm, so either write a custom conversion system that patches stuff after built-in conversion systems run, or e.g. write unsafe code to patch things when you spawn them; see this naive example)
    • Write a custom IBodyPairsJob to filter them out (see this sample)