Scaling a Scene with a Static Body node

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By afk_mario

I’m working on a 3D game and want to re-use some assets, I started scaling and rotating them and collisions stopped working on them.

I saw this issue Rotation/Scale/Translation mixes on CollisionShapes not consistently resulting in correct collision · Issue #41685 · godotengine/godot · GitHub but it seems that you are not supposed to scale the Collision Shape node, which I’m not doing, I’m scaling the parent scene containing the mesh and collision shape. Is this not possible ?

:bust_in_silhouette: Reply From: gamedevshirious

Try changing Shape properties of the Collision shape, in my case, it’s a Capsule, in your case it might be something else, you’ll get the idea.

screenshot.png

:bust_in_silhouette: Reply From: timothybrentwood

which I’m not doing, I’m scaling the parent scene containing the mesh and collision shape.

scale is one of the properties that are automatically inherited by child nodes. You can attach a script to the collision shape and in _ready() do set_as_toplevel(true) to prevent it from inheriting the parent’s scale but that is NOT something I advise doing with a collision shape since your collisions could potentially be skewed from what they appear to be. Doing so will also make you work in “transformed coordinates” relative to the parent node so it should just be a headache all around.