#How to scale a MeshInstance3D AND a PhysicsBody3D at once?

1 messages · Page 1 of 1 (latest)

undone nest
#

Sidenote: I know that CSGs are preferred when it comes to prototyping, but id like to know the method when it comes to actual deployable development.
I am a total beginner, and the way I create objects currently is that I create a StaticBody3D, then I add a CollisionShape3D and a MeshInstance3D to it. This works well, however the problem is that when I wanna scale the object (let's say I wanna make it twice as wide), I have to change the property in both the StaticBody AND the MeshInstance. Is there any way to bind the two values together? Or am I doing the whole thing wrong entirely and there's a better way to do it?

thorny wave
#

If the MeshInstance3D a child of the PhysicsBody3D, it will follow its scale.

Unless there is a non-3D node as intermediary between the parent and the child.

The node will also ignore the inherited transform if it has its "top_level" property set to true.

undone nest
#

it says "change its size in child nodes instead", and since the two children can only be siblings, i cant figure out a way to bind them

thorny wave
undone nest
thorny wave
#

Generally you don't want to have a 1:1 between your visible mesh and your physical mesh. Since one is more expensive than the other.
But if you do want that, you'd have to make the shape trough code to have the same points as the other shape.

#

Altho BoxShape does not actually use points.

undone nest
#

so generally ppl just change both variables every time?