physics:translate()¶
Type:
functionSee also: skeleton.physics, physics:rotate()
Overview:¶
Translates all physics constraints by the given (x, y) offset.
Syntax:¶
physics:translate(x, y)
x(required):number– The horizontal translation offset.
y(required):number– The vertical translation offset.
Example:¶
local spine = require("plugin.spine")
local hero = spine.create(skeletonData)
-- Move physics constraints 10 units right, 20 units up
hero.physics:translate(10, -20)