#Mesh data from PhysicsCollider
1 messages · Page 1 of 1 (latest)
I think I know I saved this code from when a dev had a similar question before
Entities
.WithName("ChangeColliderFilterJob")
.WithoutBurst()
.WithStructuralChanges()
//.WithNativeDisableUnsafePtrRestriction()
.ForEach((ref PhysicsCollider collider) =>
{
collider.Value.Value.SetCollisionFilter(new CollisionFilter
{
BelongsTo = 0,
CollidesWith = 0
});
Unity.Physics.CapsuleCollider * capsuleCollider = (Unity.Physics.CapsuleCollider*)collider.ColliderPtr;//TODO A way to change the radius of a collider
var capsuleGeometry = capsuleCollider->Geometry;
capsuleGeometry.Radius = 1f;
capsuleCollider->Geometry = capsuleGeometry;
}).Run();```
not sure if that's exactly what you are after though