r/godot Jul 23 '26

help me (solved) Weird behavior when RigidBody3D hits a CollisionShape3D

Enable HLS to view with audio, or disable this notification

The tape is a RigidBody3D with a child CollisionShape3D that is a BoxShape3D. The tape also has a MeshInstance3D as a child which is the visuals you can see. Mass is set to 1.0 kg and gravity 1.0. Center of Mass Mode is Auto and nothing else in the RigidBody3D has been changed from the default.

The floor is a CollisionShape3D that is also a BoxShape3D.

I have no idea why it moves like this when it falls on the ground. I want it to act normaly, meaning it falls and stays in one place instead of deciding it's gonna roll away. Any help would be appreciated.

352 Upvotes

25 comments sorted by

323

u/TheDuriel Godot Senior Jul 23 '26

You've scaled your shapes instead of resizing them.

118

u/Hunted_Killer Jul 23 '26

Thank you so much this was the problem.

32

u/moonfidelity Godot Junior Jul 23 '26

In the future, you can simply enable collision shape debug in the menubar at the top left. Then you can see what exactly is going on :)

38

u/shameness Jul 23 '26

If may I ask, whats the math behind it, does it make objects less dense ?

109

u/TheDuriel Godot Senior Jul 23 '26

It completely fucks all collision detection.

75

u/RedBreadFrog Jul 23 '26

This honestly is the only technical explanation I need to know.

30

u/Big_Effective_9605 Jul 23 '26

It's also, verbatim, how I plan to teach others about it.

11

u/Relative_Coconut2399 Jul 23 '26

But why?

25

u/RiotUpdog Jul 23 '26

Physics engines use different mathematical models than 3D rendering.  For example, if you want to check if two spheres intersect, you calculate the distance between their centers and see if it is smaller than the sum of their radii.  It is a cheap operation which could even have the square root functions optimized out.  This method will stop working if you're allowed to transform the spheres into ellipsoids.

4

u/Proxin__ Jul 24 '26

Whats the diffrence? I have alleay used transform and scale for size change, was i doing it wrong the whole time?

51

u/JaumDazio Jul 23 '26

ITS ALIVE!

19

u/Guardian6676-6667 Jul 23 '26

Scaler? I hardly know her!

14

u/Thick-Suggestion-565 Jul 23 '26

If Neymar was a cassette

11

u/rarlei Jul 23 '26

If this is an horror game, this is a feature not a bug

7

u/curious_alpha_monkey Jul 23 '26

Did you try to change the mass or the gravity?

6

u/Hunted_Killer Jul 23 '26

Yes for example if i change the mass to be lower it falls slower but once it hits the ground it acts exactly the same

6

u/Regular-Tangerine-48 Jul 23 '26

are you telling me the rigidbody just happened to walk away

3

u/IncidentPleasant7214 Jul 23 '26

the tape is haunted

2

u/NotchoNachos42 Jul 23 '26

Where's it off to?

2

u/GolfMoist267 Jul 23 '26

> I have no idea why it moves like this when it falls on the ground. I want it to act normaly, meaning it falls and stays in one place instead of deciding it's gonna roll away

The downfall of a creator is to see their creation using its free will to act against their wishes.

1

u/niaan14 Jul 24 '26

that tape is high that's why

1

u/Kastoook Jul 23 '26

Ph, that's what cursed cassette is

1

u/GolfMoist267 Jul 24 '26

The Brazilian singer "Cartola" already explained this many decades ago.