Singleton utility providing physics collision connection helpers. More...
| Import Statement: | import Clayground.Physics |
PhysicsUtils offers convenience functions for connecting to Box2D fixture collision signals, automatically extracting the target item from contacted fixtures.
Example usage:
import Clayground.Physics
Component.onCompleted: {
PhysicsUtils.connectOnEntered(myFixture, (entity) => {
console.log("Collided with:", entity)
})
}
Connects a callback to the fixture's beginContact signal.
Connects a callback to the fixture's endContact signal.