Drag And Drop in 3D - DragDrop3D

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

Hey all,

I mimicked the following drag and drop in 3D code available here godot-plugin-DragDrop3D and am getting the same freeze / sluggish movement of he original code
whenever I hit the edges …

Is this behaviour expected ? It should be easy to reproduce using the original code.

If there is no workaround to this algorithm project_ray_origin , project_ray_normal , intersect_ray , can someone indicate a better one achieving the desired / smooth result ?

Tested on Ubuntu laptop + Android device : Same behaviour.


:bust_in_silhouette: Reply From: GameVisitor

For my code, I found the solution by putting the floor as layer collision 2 and the raycast collision mask to 2:

var cast = cam.get_world().direct_space_state.intersect_ray(from,to, [rigidBod], 2, true, false)

thus bypassing hickups on other rigid bodies.
It is now working very smoothly on my Android phone.