Skip to main content

Ricochet2DResult

@zylem/game-lib


@zylem/game-lib / behavior / Ricochet2DResult

Interface: Ricochet2DResult

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/ricochet-2d.d.ts:15

Ricochet2DFSM

FSM + extended state to track ricochet events and results. The FSM state tracks whether a ricochet is currently occurring.

Properties​

normal​

normal: object

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/ricochet-2d.d.ts:25

The collision normal used for reflection

x​

x: number

y​

y: number

z?​

optional z?: number


speed​

speed: number

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/ricochet-2d.d.ts:23

The resulting speed after reflection


velocity​

velocity: object

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/ricochet-2d.d.ts:17

The reflected velocity vector

x​

x: number

y​

y: number

z?​

optional z?: number