Open jimrange opened 9 years ago
Maybe it's because update
is called twice. As a result damping is applied twice https://github.com/cocos2d/cocos2d-x/issues/14231
That could potentially be part of the issue I am seeing. But I am also seeing shapes getting sized differently with the same code. e.g. in 3.8.1 the shapes were one size, but now in 3.9beta0 the shapes are a different size with the identical game code.
Looks like the refactoring of the 2D physics wrapper has resulted in changes to the mass, moment and size of shapes.
I haven't figured out the root cause of this issue, but this discussion shows before and after images from upgrading from 3.8.1 to 3.9beta0. In 3.8.1 the mass and moment of the vehicle were tuned so that the torque applied to the wheels would make the vehicle move responsively and the shapes and sprites were adjusted to properly model the race car. But after upgrading to 3.9beta0 the car barely moves as if the mass or moment drastically increased and the wheel shapes are much larger than the sprites.
No changes were made to the game source code other than upgrading from 3.8.1 to 3.9.
http://discuss.cocos2d-x.org/t/cocos2d-x-3-9-beta0-released/24507/24
Here is some code showing how I create some of the vehicle shapes: