skeleton.physics

Type: userdata or nil

Overview

The skeleton’s physics constraints as one object: see skeleton.physics for its properties and methods. A write to it reaches every physics constraint of the skeleton. skeleton.physics is nil when the skeleton data has no physics constraints.

Example

local atlas = spine.loadAtlas("assets/characters/celestial-circus.atlas")
local data = spine.loadSkeletonData("assets/characters/celestial-circus.json", atlas)
local circus = spine.create(data)

print(circus.physics ~= nil)  -- true: this skeleton has physics constraints
print(spineboy.physics)       -- nil: spineboy has none