Godot Version
4.7.1
Question
I am trying to make a throwing mechanic for my game, but I can’t get it to work. The object I am trying to throw is a RigidBody3D.
if Input.is_action_just_pressed("Throw"):
if closestPackage != null:
remove_child(closestPackage)
get_node("/root/Main/Packages").add_child(closestPackage)
closestPackage.velocity = Vector3(0, 0, 0)
closestPackage = null
set_meta("holdingPkg", false)
Here is what I have so far, it doesn’t work.