parts of a cube 2 times bigger than a cube

Godot Version

Godot 4.4.1.stable

Question

I want to make it so that when a cube is shot, it will split into pieces.
it splits, but its parts become 2 times the size of the whole part, what should I do? I have attached the video

(CODE)

(DEBUG)

This part looks wrong:

parts.set_scale(Vector3(0.5, 0.5, 0.5).normalized())

I think you can just remove that line. You are allready copying the scale when you set the .basis on the previous line. Basis has both rotation and scale in it.

You can simplify the whole thing by copying the whole transform:

parts.global_transform = global_transform

That would take care of pos, rot and scale at once.

1 Like

thank you, didn’t even thought about it😁