self:get_velocity
Client
Retrieves the current velocity of the character body
Syntax
local velocity = self:get_velocity()Parameters
| No parameters are accepted by this function |
|---|
Returns
| Type | Name | Description |
|---|---|---|
vector3 | velocity | Current velocity as {x, y, z} |
Examples
local entity = physics.character.create()
local velocity = entity:get_velocity()
core.engine.print("info", "Character body velocity:", util.table.unpack(velocity))