Hi guys. I mentioned this “anomaly” in another thread, but it’s time to make it official and ask for input/help/info.
This APPEARS to be an issue “within” CannonJS. I don’t think Stefan Hedman, author of CannonJS… is maintaining CannonJS anymore, but I will still report this to him… when his website starts working again.
There’s the baby, trying to lift a hinge-joint leg, using line 108
joint1.setMotor(-.4, 99999999);. I need the slow .4 speed, so don’t mess with that value… during these tests… as that will affect outcome.
As you can see, the CannonJS motor does not have enough/proper maxForce (set at 99 million)… to lift the 0.3-mass leg. The motor is slipping.
Now change to OimoJS, in lines 32-34 area. Run!
This time (using Oimo), the leg does a little y-axis spin, then the motor runs perfectly (in opposite direction of cannon version). No slippage, constant speed, perfect.
Now change to AmmoJS, in lines 32-34 area. Run! Same as Oimo… a little spin, and motor runs perfect… slow and consistent, in the opposite direction of CannonJS.
Needless to say (but I’m still saying it for future Cannon users)… CannonJS is doing motors differently than Ammo and Oimo.
In lines 106 to 120… are 3 different methods of activating CannonJS motors. I am currently using version #1, BJS-impostor-based… so it works on all physics engines. If you would like to do tests with method #2 and #3, make sure you have returned to using CannonJS plugin.
All three methods of activating the CannonJS motor… produce the same results… weak/slipping motor… almost as-if maxForce is being ignored.
For the adventuresome: Set Cannon physics, and then activate version #3… which is Cannon “deep native”. I set minForce == negative maxForce… because that’s what Stefan does in HIS code… here.
Ok, consider this officially reported. Future CannonJS motor users with problems related to this… MIGHT be able to find answers, via this post.
As a sidenote, I am seeking continuous readout of motor/hinge current-angle during hinge-motor run. This is something I only know how to do… in Oimo. The other two engines do not appear to have hinge current angle well exposed, but I’m still learning.
I invite discussion and tests, and all the info/knowledge I can get. I will mark this thread as solved, if anyone wishes me to do so. For one of MY projects, this is a showstopper and might make me change physics engines.
If anyone has close-contact with Stefan Hedman, please contact him and ask kindly… if he would be willing to help us with this… if he’s interested. (AND invite him to our new forum, of course.) Thx!