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?