Claw Machine - First Box2D attempt

I'm building a few lame games to get acquainted with Box2D Flash API. 🙂

http://zlap.deviantart.com/art/Claw-Machine-Flash-Physics-99956440

I still have a lot to learn( obviously 😛 )!
its a nice start - perhaps you could set a lower maxMotorTorque on the revolutejoints so it wont grab so hard, and stop it from pushing things through the claw
zappBrannigan wrote:
its a nice start - perhaps you could set a lower maxMotorTorque on the revolutejoints so it wont grab so hard, and stop it from pushing things through the claw


Hey that will probably have no effect, since I believe I'm manipulating the claws in a kinda lame way.

I have them set with fixedRotation and I'm doing this to close them:
Code:
m_joint1.m_body2.SetXForm( m_joint1.m_body2.GetPosition( ), m_joint1.m_body2.GetAngle( )-.01 );
m_joint1.SolvePositionConstraints( );


I know it's not the right way 🙂

Also I think I'm not doing the ascending/descending of the claw properly. Since I have a distance joint from the celling and I'm changing the length.

Any tips would be welcomed 😀
ah ok, sorry for assuming things. Check out the revolute joint in the as3 manual. Use this to attach your claw "fingers" to the claw, and then set the motorSpeed property of the joint to close/open it.

Original thread: https://box2d.org/forum/viewtopic.php?t=1569