Revolute Joint Balance Game

So I have a match 3 game where blocks need to be balanced on a platform. Before I had used 2 blocks, a small block that didn't move, and a long rectangular one that balanced on it that held the falling blocks. When I had done it this way the game was quite balanced and fun to play but every so often the top rectangle could get bumped horizontally by a falling block and then it became hard to balance when the when the sides were different lengths on each side of the static block. Therefore, I decided to use a revolute joint. Unfortunately however the revolute joint like to spin around... alot. I've tried messing around with some of the properties to no avail. It seems like whenever the first block hits one side of the revolute joint, the joint really wants to spin that way. I put one block on the left and it drops left, then I need to put like 4 on the right to try and balance it and it starts to go right. Hard to explain but it's very topsy turvy. Can anyone give me suggestions on how to fix this because otherwise I'm just going to have to go back to my old inferior meothod...

...I also just switched the art to vector and it gets really laggy now. Any way I can fix this because I don't like how blocks look when rotated when they are bitmaps.
Bump...
bcapecci wrote:
...I also just switched the art to vector and it gets really laggy now. Any way I can fix this because I don't like how blocks look when rotated when they are bitmaps.


That is a display problem, unrelated to Box2D. Maybe people could still help, but you don't say much about what you are doing.


For the balance, I would say that a revolute joint should work.
Could you make pictures describing your problem ? It could help others understand how you setup the joint.
I just got back to looking at this today -.- I appreciate your response. As far as the speed goes, I'm just going back to using bitmaps. My artist had some really nice vectors but usability trumps aesthetic imo. Attached is a screen shot that might give you a better conceptualization of my mechanics problem... And heres the code pertaining to the revolute joint:

Code:
var boxBody:b2BodyDef = new b2BodyDef();
boxBody.position.Set(startX / 30, 280 / 30);
boxBody.type = b2Body.b2_dynamicBody;
         
var boxShape:b2PolygonShape = new b2PolygonShape();
boxShape.SetAsBox(316/2/30, 15/2/30);      
         
var boxFixt:b2FixtureDef = new b2FixtureDef();
boxFixt.shape = boxShape;
boxFixt.density = 20;
boxFixt.restitution = .2;
boxFixt.friction = 0.1;
         
var newBox:b2Body = GameMain.world.CreateBody(boxBody);
newBox.CreateFixture(boxFixt);
         
var circleBody:b2BodyDef = new b2BodyDef();
circleBody.position.Set(startX / 30, 280 / 30);
circleBody.type = b2Body.b2_staticBody;
         
var circleShape:b2CircleShape = new b2CircleShape(7.5/30);
         
var circleFixt:b2FixtureDef = new b2FixtureDef();
circleFixt.shape = circleShape;
         
var newCircle:b2Body = GameMain.world.CreateBody(circleBody);
newCircle.CreateFixture(circleFixt);
         
var jointDef:b2RevoluteJointDef = new b2RevoluteJointDef();
jointDef.Initialize(newBox, newCircle, newCircle.GetWorldCenter());
         
var jointFinal:b2RevoluteJoint = GameMain.world.CreateJoint(jointDef) as b2RevoluteJoint;


And I'll of course add any main contributors to solving the problem to the credits.
I think you might need to post a series of two or three screenshots of the game screen so we can see what the problem is. Speaking for myself at least, from the one you show us there I can't see anything wrong...

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