physics.character.platform_on_leave
Client
Enumeration of behaviors controlling velocity handling when a character body leaves a moving platform
Values
| Constant | Description |
|---|---|
physics.character.platform_on_leave.ADD_VELOCITY | Retains the platform's velocity when leaving it, carrying momentum forward |
physics.character.platform_on_leave.ADD_UPWARD_VELOCITY | Retains only the platform's upward velocity when leaving it |
physics.character.platform_on_leave.DO_NOTHING | Discards the platform's velocity entirely when leaving it |
Examples
local entity = physics.character.create()
entity:set_platform_on_leave(physics.character.platform_on_leave.DO_NOTHING)