2D Physics motion I don't understand

Godot Version

Version 4.4

I have been fiddling with physics and I have come across a behaviour I don’t understand.
I have the physics settings so that the default gravity vector is (0,0):

In a scene I have a RigidBody2D as root node with a CollisionShape2D (Rectangle) as a child and a CharacterBody2D as a child.
The CharacterBody2D has a CollisionShape2D as a child.
In this image you can see the scene tree and the shapes:


Note that there is no script.
If the scene is run as is in the image nothing happens (as expected).
But if I move the CharacterBody2D to the point it touches the RigidBody’s Collision shape and run the scene, the whole thing travels to the right.

The more inside the CharacterBody goes the faster everything travels.
If the CharacterBody is moved far enough inside the whole thing helecopters around.

And if I move the CharacterBody to the other end the whole scene will move to the left.

Again this motion happens without any scripts running.

I have tested the velocity property of all the nodes and get (0,0) (although so far I only tested this in _ready() function so maybe that is before motion begins).
What is causing this motion?
What property of what node affects this?
Can it be controlled (or turned off)?
Am I doing something that isn’t recommended?

your character is trying to push the box because CharacterBody2D will try to push RigidBody2D out of it collision by default while your RigidBody2D drag your character because your character is a child of the box


:rofl: :rofl: :rofl:
you can change the mask if you want to make it interact with everything else but not it self (certain collision)

How does it determine which direction to go since I have given the gravity no direction?