Collision Shapes Don't Match the 3D Model

Okay, i found the problem. It was an issue with both the main thread and the collision thread.
As I suspected since yesterday, it was a problem with the rotation. The rendered hitbox and the one in the worker were indeed matching but had a rotation. A few days ago, during a test related to the problem that occurred when i started this thread (when it was a rectangular box for the collision shape) and when the physics wasn’t completely initialized, i changed a value from 0 to Math.PI in order to get a rotation.

After improving the physics, i synchronized the rendered hitbox and models by sending values from the worker thread to the rendering thread. During the same time, i added a rotation for the collision shapes in the worker. This resulted in the models in the main thread rotating twice, while the shapes in the worker were rotating once…

Thank you to everyone who tried to help me and participated. Despite the tensions, i really appreciated the support and assistance from everyone.
Great community.

@CrashMaster i port my already existing/mostly finished 2.5D MMORTS from a 2D custom engine to 3D, as WebGPU and new laptop iGPU give pretty good performance. Despite this little mistake, it’s pretty easy to handle (it’s just one game for my gaming plateforme, but you right, maybe i could need help one day or another).

That said, to be very honest and despite my manners to write, i wasn’t trying to trashtalk or being angry, except for when i started reading a comment few hours ago that gave me the impression of being despised. For my previous messages i understand that these were inappropriate remarks as BabylonJS is a great product and free.

I could destroy the whole earth with such spacecrafts, so guys, i HIGHLY encourage you to stay cool. :grin:

2 Likes