# Wheel Joint Implementation in AndEngine

I am currently developing car game in AndEngine. In which I was using revolute joint for car wheel and chassis attachment. But my friend suggest me that use wheel joint for that purpose for better behavior of the car. In AndEnginen I didn't found the wheel joint implementation. So what I have to do for wheel joint implementation.

I think I have to manually update the box2d library for this purpose but I don't know how many things get updated. Please suggest me some guidance on achieving better car behavior in AndEngine.

• For wheel joint implementation in AndEngine, combine both revolute and prismatic joint. You get similar effect of wheel joint using combination of this both joint. – Siddharth Jan 15 '13 at 15:10

I am using box2d version >2.3.0 where it supports wheel joint and also updated in the andengine source,

source:Andengine Example code like,

import com.badlogic.gdx.physics.box2d.joints.WheelJointDef

WheelJointDef f = new WheelJointDef();
f.initialize(bodyA, bodyB, anchorBody, axis);//axis for suspension feature(Vector2)
f.enableMotor=true;
f.frequencyHz=2; //this indicates ration for suspension, set the value as needed in the game.
getPhysicsWorld().createJoint(f);


Search Wheel joint on this link : box2d manual