Joints without physics

I’m wondering how to go about creating joints without the physics library? For example, to create an arm that remains attached to a character’s torso, but can rotate independently. I imagine I could achieve this using an enterframe listener, but I feel there must be a more elegant solution?

Enterframe listeners can be pretty efficient and even elegant depending on how you structure them.

You will want to adjust the anchors points as well so the limbs rotate correctly with regard to the torso.

[lua]

local function jointAction()

    --adjust x/y position with regard to the torso

    --adjust rotation

end

Runtime:addEventListener( ‘enterFrame’, jointAction )

[/lua]

Enterframe listeners can be pretty efficient and even elegant depending on how you structure them.

You will want to adjust the anchors points as well so the limbs rotate correctly with regard to the torso.

[lua]

local function jointAction()

    --adjust x/y position with regard to the torso

    --adjust rotation

end

Runtime:addEventListener( ‘enterFrame’, jointAction )

[/lua]