Page 1 of 1

which joint for vehicle/motorcycle

Posted: Sat Nov 23, 2013 8:04 am
by vkreal
Hi Iforce2d,

In some of your rube samples I see you use 'revolute' for example motorcycle wheels, is this the best way to go or should it be 'wheel' joints. I am getting weird issues using motorcycle sample and i think it might be using the wrong joint. Would have to set high numbers for it to go up slopes.

Code: Select all

  
m_rearDrivejoint->SetMaxMotorTorque(40);
        m_rearDrivejoint->SetMotorSpeed(-2000);

Re: which joint for vehicle/motorcycle

Posted: Sat Nov 23, 2013 11:21 am
by iforce2d
Wheel joints are much better, if the port you are using has them. I'm pretty sure all the examples will be using wheel joints for the motorbike, at least in the exported .json file. Depending on which sample you are talking about, the loader sometimes needs to use a different joint type, eg. for Javascript, box2dweb has no wheel joint so the loader makes a line and distance joint combo instead.

Re: which joint for vehicle/motorcycle

Posted: Sun Nov 24, 2013 2:25 am
by vkreal
I am very newb to box2d, why wheel joint much better than revolute joint in respect to making vehicle wheels. Do you know the advantages and disadvantages between them in this aspect?

question about your downhill game, are you applying force on the bicyclist when he is paddling to get speed/acceleration or is just from wheel motor joint and down hill momentum?

Thanks!

Re: which joint for vehicle/motorcycle

Posted: Sun Nov 24, 2013 1:40 pm
by iforce2d
The wheel joint has suspension, and it was designed to be used with vehicles. You can use revolute joints for a car but they have no spring or damping behaviour, so it looks very rigid like an old wooden cart. The suspension also helps to keep the wheel touching the ground which is better for getting traction to drive and brake.

In DHS only the wheel motor is used to move the bike.