Weird problems with 3D dynamic collisions at non (0,0,0) positions

Hi! I’m experimenting with 3D games in Defold (so far, I’ve only used Defold for 2D games). I’m currently using version 1.12.3.

I started by tinkering with the “3D third-person game sample.” I wanted to change the rocks to use dynamic collisions instead of static ones. After changing the type and collision masks, some strange things started to happen - the rocks began falling through the ground plane (or other objects) and a message appeared in the console:

WARNING:PHYSICS: Overflow in AABB, object removed from simulation
WARNING:PHYSICS: If you can reproduce this, please email bugs@continuousphysics.com

WARNING:PHYSICS: Please include above information, your Platform, version of OS.

WARNING:PHYSICS: Thanks.

I started looking for intersecting objects etc. but found nothing. Somehow I found out, that the problem is collision shape position offset:

After changing its position to (0,0,0) rocks behave correctly:

I couldn’t find any recommendation stating that a collision shape should not be moved away from (0,0,0). In fact, the ability to control its position suggests that this should work without issues.

I was about to report this as a bug, but I checked another version of Defold (1.12.2), and everything behaved exactly the same. So I decided not to report it - perhaps collision shapes simply need to stay at (0,0,0). However, when I tried using a “capsule” shape with barrels (and later with rocks), things became completely unstable - objects started flying around at extreme speeds.

So, in summary:

  • I cannot place “sphere” or “box” collision shapes at positions other than (0,0,0) without breaking collisions.
  • I cannot use the “capsule” collision shape because everything goes out of control—even with very small capsules, objects bounce at extremely high speeds.

I don’t think the engine itself is this broken, so something must be wrong in my project. Could someone take a look and suggest what I might be doing wrong?

(well, maybe a bit off-topic, but I tried to upload 33.7 MB zip file with whole modified project here and got info that file is too big, however it says that maximum size is 48.8 MB):

I uploaded the file then: Download CookingGame.zip | LimeWire

2 Likes