Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

PhysicsDebugDisplay is slow.

Discussion in 'Physics for ECS' started by TaeRyong_Song, Apr 12, 2022.

  1. TaeRyong_Song

    TaeRyong_Song

    Joined:
    Feb 6, 2014
    Posts:
    6
    In the PhysicsDebugDisplay, DrawColliers are too slow. Is there any way to check the collider created with Convex Collider with high performance?
    Or, can I draw collider only specific objects?
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,738
    yeah gizmos are just super slow. i rewrote the debugger with my own draw library and it's magnitudes faster and just better. Can handle 1000s of colliders, actual capsules and works in development builds etc.

    I'd suggest doing the same thing with something like aline
     
    Last edited: Apr 12, 2022
    MNNoxMortem and Lukas_Kastern like this.
  3. TaeRyong_Song

    TaeRyong_Song

    Joined:
    Feb 6, 2014
    Posts:
    6
    Thank you for your answer.
    Create a convex collider with the NativeArray<float3> vertices. I think I can draw a line only if I know the index number of the vertex with that vertex. I checked the document and I don't know the index of the internal peak, is there any way?
     
    Last edited: Apr 13, 2022