#Seeing the bounds of a physicsCollider?
1 messages · Page 1 of 1 (latest)
Can't you use PhysicsDebugDisplayAuthoring.DrawColliderAabbs?
https://docs.unity3d.com/Packages/com.unity.physics@1.0/api/Unity.Physics.Authoring.PhysicsDebugDisplayAuthoring.html
Or DrawColliders on the same component
Not sure which one you want
If you don't want to use the debug display you can get a pointer to the collider from PhysicsCollider and then call CalculateAABB
var collider = physicsCollider.ColliderPtr;
var aabb = collider->CalculateAABB();
Note that it needs unsafe context
Then you could use any gizmo function to draw it
How do I use this if I only have an entity? It's not a gameobject/monobehaviour. Can you give me a quick example?
You create a GameObject in a subscene and give it the PhysicsDebugDisplayAuthoring MonoBehaviour.
Just that.
Does this work for viewing overlapspherecasts?