self:get_platform_velocity

Client

Retrieves the velocity of the moving platform the character body is currently standing on


Syntax

local velocity = self:get_platform_velocity()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
vector3velocityPlatform velocity as {x, y, z}

Examples

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

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

On this page