createColliders method
List<int>
createColliders(
- int bodyHandle,
- Shape shape, {
- PhysicsMaterial material = PhysicsMaterial.defaultMaterial,
- bool isTrigger = false,
- Matrix4? localPose,
- int collisionLayer = 0xFFFFFFFF,
- int collisionMask = 0xFFFFFFFF,
override
Creates collision geometry on bodyHandle and returns one handle per
created collider (compound shapes may decompose; how is backend
private). Empty means the shape is unsupported by this backend.
Implementation
@override
List<int> createColliders(
int bodyHandle,
Shape shape, {
PhysicsMaterial material = PhysicsMaterial.defaultMaterial,
bool isTrigger = false,
Matrix4? localPose,
int collisionLayer = 0xFFFFFFFF,
int collisionMask = 0xFFFFFFFF,
}) {
final handle = _nextHandle++;
_colliders[handle] = _BasicCollider(
bodyHandle,
shape,
isTrigger,
collisionLayer,
collisionMask,
localPose ?? Matrix4.identity(),
);
return [handle];
}