Creating a New QBodyNode and a New QMeshNode - erayzesen/godot-quarkphysics GitHub Wiki

Now that we have added a QWorldNode to our scene tree and defined our physics world, the next step is to add QBodyNode objects and the QMeshNode objects that will give them shape and character in the world.

You can add a QBodyNode using the shortcut Ctrl + A or by clicking the [+] button in the Scene Tree panel. You can choose from different types of QBodyNodes, such as QRigidBodyNode, QSoftBodyNode, QAreaBodyNode, or QPlatformerBodyNode. However, every QBodyNode added to the scene requires QMeshNode objects as children. These nodes define the shape and other important properties of the object.

If we ignore all dynamics other than rigid bodies, this usage scenario is very similar to Godot's built-in physics engine.

You should add a QMeshNode as a child of the previously created QBodyNode, just like you would add a standard node. A QBodyNode can have multiple QMeshNode children.

Of course, all of this can also be done through code:

#Adding QRigidBodyNode to the Scene
var my_rigid_body=QRigidBodyNode.new()
my_rigid_body.global_position=Vector2(20,20)
add_child(my_rigid_body)
	
#Adding QMeshRectNode to the QRigidBodyNode as a Child
var my_mesh=QMeshRectNode.new()
my_mesh.rectangle_size=Vector2(64,64)
my_rigid_body.add_child(my_mesh)

However, I assume you might want to learn more about QMeshNode. For that, you should proceed to the third tutorial.