self:get_contact_normal

Client

Retrieves the surface normal at the point where the wheel is touching the ground


Syntax

local normal = self:get_contact_normal()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
vector3normalContact normal as {x, y, z}

Examples

Get the contact normal of a vehicle wheel
local car = physics.vehicle.create()
local entity = physics.vehicle_wheel.create(car)
local normal = entity:get_contact_normal()

core.engine.print("info", "Vehicle wheel normal:", util.table.unpack(normal))

On this page