Hello fellow Corona developers.
I have this code where I want to register the rotation of two display objects (rectangles), and when I call my object.rotation it is always = 0. There is a pivot joint between the two rects I’m trying to rotate and get the rotation of.
So, the function that isn’t working. With some comments:
function gameEngine.engageJoint(joint, affect, angle, torque) -- with this I would like the thigh of a person to be lifted. -- so joint is the lower back, and affect would be the tigh. local curAngle = joint.rotation-affect.rotation if curAngle \> angle then affect:applyTorque( torque ) elseif curAngle \< angle then affect:applyTorque( -torque ) end end
I hope you can help me! Because this is really frustrating.
I don’t know if this has anything to do with it, but this project is older than the new update. So I made it have the compatibility mode on for v1 graphics.
Thanks in advance!