physics.character.platform_on_leave

Client

Enumeration of behaviors controlling velocity handling when a character body leaves a moving platform


Values

ConstantDescription
physics.character.platform_on_leave.ADD_VELOCITYRetains the platform's velocity when leaving it, carrying momentum forward
physics.character.platform_on_leave.ADD_UPWARD_VELOCITYRetains only the platform's upward velocity when leaving it
physics.character.platform_on_leave.DO_NOTHINGDiscards the platform's velocity entirely when leaving it

Examples

Reference the platform on leave enum
local entity = physics.character.create()

entity:set_platform_on_leave(physics.character.platform_on_leave.DO_NOTHING)

On this page