How to move a RigidBody with the mouse in 3D (x, z)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By eder126

FYI I’m terrible at explaining myself, so I will leave an example of what I’m looking for at the end.
I’m just messing around with the engine, and I’m pretty certain it can be done, but I haven’t quite figured it out yet.
Already have the Camera, Raycast, Character and so set, I want to look at a RigidBody, in this case a cube or whatever other shape, and once I right click with the mouse looking directly at the object to be able to move this object with the mouse, BUT, the x axis movement should move the x position of the body, all good, the y axis movement of the mouse should move the z position of the body. The y axis movement will be controlled with the keyboard, so no need of that included.

I’m not sure of how to do that, and if whether or not I should change the mode of the body to static in order to move it manually and not with the method move_and_slide.

Sort of resembling a telekinetic power like in this game:
Example: https://www.youtube.com/watch?v=eNL5h2PtAJM