Canoon.js Joints "lagging" behind

Hi!

this is another part to the car. I have it moving, but the wheels tilt when turning (I don’t rotate the wheels to turn, should fix)
whuuu
They should be straight and vertical, but aren’t.

Why?

Simple playground? You know it works around here, G-wiz. :slight_smile:

https://playground.babylonjs.com/#TYD4D6#4 :upside_down_face:

I don’t see much bad wheel-camber in that playground, G. I can’t make the playground look like the picture at all. Hmm. How do I reproduce same camber problem seen in picture? (thx) Nice working car, actually… a bit heavy… but no biggie.

I forgot that I updated it a bit: https://playground.babylonjs.com/#TYD4D6#5
Hold w and either a or d. press space if you flip over.

Go back to #4 and delete all changes you did in #5. heh. Obviously, somehow, angularVel is/gets too high in #5. You can fig this… me thinks.

Hey, this is a time for the new “Playground Comparinator 9000ᵗᵐ”
All I did between 4 and 5 is add a heightmap (don’t feel like uploading it onto gitlab) and readjust the turning. (should make it like actual turning, but now it’s just using the back wheels)

C’mon, examine your turn power.

          if (tl && mf) {
            joints[0].setMotor(0);
            joints[3].setMotor(50);
          } else if (tr && mf) {
            joints[0].setMotor(50);
            joints[3].setMotor(0);

SetMotor 50? and you don’t have (tl && mf) & (tr && mf) tests in the #4.

It took me… oh… 38 seconds to find these diffs? Dude.

The setting on side to 50 in the back gives that side enough power to turn. A jank way of doing it, but it works.

… to flip the mass 20 car on its side, just like in real life when you spin cookies too fast. it’s acting exactly correct… I’d say.

-half of the time, The other half it works. I should use the wheel joint, but when playing with it’s playground it seems like it has some, well, issues.