Restrict b2MouseJoint movement to x axis
Posted: Mon Jun 02, 2014 7:21 am
I have set up an object that falls from the top of the screen using box2d gravity. I am now implementing the ability to move the object using a b2MouseJoint as set out in the following article
http://www.raywenderlich.com/28604/how- ... ial-part-1
My question is how can i just effect the x axis movement with the mousejoint and leave gravity to take care of the y axis. Box2D v2.3.1
I have tried using the code in the article to limit the movement but that just stops the object from falling at all.
Any help would be great awesome!
http://www.raywenderlich.com/28604/how- ... ial-part-1
My question is how can i just effect the x axis movement with the mousejoint and leave gravity to take care of the y axis. Box2D v2.3.1
I have tried using the code in the article to limit the movement but that just stops the object from falling at all.
Any help would be great awesome!