API

Class FlowGraphPhysicsCollisionEventBlockExperimental

An event block that fires when a physics collision occurs on the specified body. Subscribes to the body's collision observable and exposes collision details (the other body, contact point, normal, impulse, and distance) as data outputs.

Hierarchy (View Summary)

Index

Input connection: The physics body to monitor for collisions.

the configuration of the block

dataInputs: FlowGraphDataConnection<any>[]

The data inputs of the block.

dataOutputs: FlowGraphDataConnection<any>[]

The data outputs of the block.

distance: FlowGraphDataConnection<number>

Output connection: The penetration distance of the collision.

Output connection: The signal that is triggered when the asynchronous execution of this block is done.

An output connection that can be used to signal an error, if the block defines it.

impulse: FlowGraphDataConnection<number>

Output connection: The impulse magnitude computed by the physics solver.

Input connection: The input signal of the block.

initPriority: number = 0

the priority of initialization of this block. For example, scene start should have a negative priority because it should be initialized last.

metadata: any

Metadata that can be used by the block.

name: string

The name of the block.

Output connection: The world-space collision normal direction.

Output connection: The other physics body involved in the collision.

Output connection: The signal that is synchronous triggered when the execution of this block is done. Note that is case of events or async you might want to use the done signal instead.

Output connection: The world-space contact point of the collision.

priority: number = 0

The priority of the block. Higher priority blocks will be executed first. Note that priority cannot be change AFTER the block was added as sorting happens when the block is added to the execution queue.

Input connections that activate the block.

signalOutputs: FlowGraphSignalConnection[]

Output connections that can activate downstream blocks.

type: FlowGraphEventType = FlowGraphEventType.NoTrigger

The type of the event

uniqueId: string = ...

A randomly generated GUID for each block.

  • get eventKey(): string
    Experimental

    Stable key used to represent this event during propagation. Event blocks with equivalent event sources should return the same key.

    Returns string