Contents

register(_:)

Registers the custom effect.

Declaration

@MainActor @preconcurrency static func register(_ updateHandler: (@MainActor (inout ForceEffectEvent<Self>) -> Void)? = nil)

Parameters

  • updateHandler:

    A closure that computes custom forces for rigid bodies.

Discussion

If a handler is specified, the physics system calls the handler and ignores the update function.