Locking rotation on a node3D

Godot Version

4.2.2

Question

How would i go about locking rotation on a node 3d? It is a child of a rigid body 3d which i cannot lock because of reasons.

You could set the child’s global rotation to 0 in the process function of its script like this:

extends Node3D

func _process(delta):
    global_rotation = 0