You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Physics Library > setData

19.4.20 setData

self = physics.Body:setData(value)

Parameter

Type

Description

self

in physics.Body

The input Body

value

in object

A programmer-supplied Lua object

self

out physics.Body

The input Body is returned as the output

Sets the programmer data field of the Body. The programmer can store any Lua object in this field. This is a handy place to store a reference to a simulation object.

Returns the Body.

Introduced in platform.apiLevel = '2.0'