self:get_real_velocity

Client

Retrieves the actual velocity the character body moved with during the last physics step, including platform influence


Syntax

local velocity = self:get_real_velocity()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
vector3velocityReal velocity as {x, y, z}

Examples

Get the real velocity of a character body
local entity = physics.character.create()
local velocity = entity:get_real_velocity()

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

On this page