Scaling environment meshes with collision

v4.5.1.stable.official [f62fdbde1]

When scaling a mesh/scene instance with collision, an editor warning appears - as I understand this is to prevent unintended behavior with primitive collision shapes, which makes sense. The problem is that I have a small number of scenes (a few variants each for trees and rocks; trees use cylinder primitive collision, rocks use trimeshes) which I need to place around my level, and scaling the instances (including non-uniformly) is essential to getting realistic variation from a manageable number of assets.

The warning says to change the size in children collision shapes instead, but that’s not feasible for each separate instance (and not possible at all with trimesh collisions).

What is the intended workflow for this situation? Am I supposed to ignore the warning? Does the engine really expect me to never scale environment meshes and make a thousand new unscaled collision trimeshes? Scaling a mesh and its attached collision was never an issue in Unreal, and I’ve never heard of it being an issue in Unity.

Thanks in advance

1 Like

You definitely should pay attention to the warnings if you expect the engine to handle the collisions correctly.

I guess allowing the altered scale would disqualify the shape as “rigid”, which would require an entirely different physics logic to deal with reliably and correctly. If you intend the shape to be static you could scale it in an external editor or by script before assigning to a Collision node. Maybe there exists a user-made plugin for that. Godot itself seem to lack the functionality.

Unfortunately as I said scaling in blender is not an option because every instance of the rocks or trees may have a different non-uniform scale which needs to be accounted for. Likewise I find it a tough pill to swallow that every single tree and rock in the game would need an attached script just to handle scaling, or that I’d need to build a tool script and remember to run it every time I change any rock or tree anywhere in any level.

I found this post on the reddit which seems to support my intended workflow:


but I can’t find any follow-up on whether that’s still planned or has been implemented now that we’re deep into 4.x. I’d love for scaled colliders to have been quietly added, if anyone has confirmation one way or the other.

edit: reduz says “rewrite parts of the physics engine” and I assume they’re talking about GodotPhysics3D… is it possible the new Jolt physics engine already handles this?

edit 2: On further research, it looks like Jolt does in fact support scaling non-uniformly, as long as “the inherent primitive shape is preserved,” which works for my use case since the trees will be uniform on the XY plane and only vary in height. I assume trimesh colliders have no constraints since they have no inherent primitive shape.

As far as I can tell, that makes the solution to my problem: Ignore or disable the editor warnings and make sure Jolt is the physics engine used. (Should be the default as of recently).