self:is_on_floor

Client

Checks whether the character body is currently touching a floor


Syntax

local result = self:is_on_floor()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolresulttrue if the condition is met, false otherwise

Examples

Check if a character body is on the floor
local entity = physics.character.create()

core.engine.print("info", "Character body on floor:", entity:is_on_floor())

On this page