#See physics collider wireframe

1 messages · Page 1 of 1 (latest)

steady python
#

How do I turn on the ability to see the wireframe of a physics collider on an entity in ECS?

I found this:

entityManager.SetComponentData(entity, new PhysicsDebugDisplayData
{
DrawBroadphase = 1,
DrawColliders = 1,
DrawColliderAabbs = 1,
DrawColliderEdges = 1
});

But it doesn't work for me and results in this error:

ArgumentException: A component with type:Unity.Physics.Authoring.PhysicsDebugDisplayData has not been added to the entity.

Any ideas?

mortal radish
#

if you didnt actually add the component in the first place, you need to use AddComponentData

unborn pewter
#

just bake it

steady python
#

Although with this added to my entity - I can't actually see the wireframe still, no console errors, but nothing visually too, is there a mode or something I need to be in to see it?

mortal radish
#

i think collider edges is just the bounds and not the actual wireframe

#

not sure if there is a way to do this using the debugdisplay. the physicsshape authoring code have an editor wireframe drawer so maybe you could adapt that?