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
| Type | Name | Description |
|---|---|---|
vector3 | velocity | Real velocity as {x, y, z} |
Examples
local entity = physics.character.create()
local velocity = entity:get_real_velocity()
core.engine.print("info", "Character body velocity:", util.table.unpack(velocity))