In NODE3d , hold onto to an object and release using mouse

Godot Version



im currently trying out hold on to an object and move around using my mouse
how do i click the object and hold on to it

extends Node3D

func _0n_ridigbody_input_event(camera,event,click_position,normal,shape_idx):
if event.is_action_pressed(“mouse_click”):
if event is InputEventMouseMotion:
var newP = Vector3(click_position.x,click_position.y,0)

			print("set position is ",newP)
			print("Viewport Resolution is: ", get_viewport().get_visible_rect().size)