self:get_contact_body

Client

Retrieves the physics body/area instance the wheel is currently in contact with


Syntax

local body = self:get_contact_body()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
objectbodyInstance the wheel is touching, or false if not in contact

Examples

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

core.engine.print("info", "Vehicle wheel contact body:", entity:get_contact_body())

On this page