self:get_up_direction

Client

Retrieves the up direction used by the character body to determine floor, wall, and ceiling surfaces


Syntax

local direction = self:get_up_direction()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
vector3directionCurrent up direction as {x, y, z}

Examples

Get the up direction of a character body
local entity = physics.character.create()
local direction = entity:get_up_direction()

core.engine.print("info", "Character body direction:", util.table.unpack(direction))

On this page