Type

PlatformEffectorCompOpt

: {

ignoreSides

?: Vec2[]

If the object is about to collide and the collision normal direction is in here (i.e. the object is moving roughly in this direction), the object won't collide. Should be a list of unit vectors LEFT, RIGHT, UP, or DOWN. Defaults to [UP], i.e. the object will only be able to pass through when it is jumping upwards, but will collide when it is moving downwards or sideways.

shouldCollide

?: (this: GameObj<PlatformEffectorComp>, obj: GameObj, normal: Vec2) => boolean

A function that determines whether the object should collide. If present, it overrides the ignoreSides; if absent, it is automatically created from ignoreSides.

}
kaplay logo

Components