Use collision detection ray to reposition an object already in the scene
Closes: https://github.com/godotengine/godot-proposals/issues/755
Related: https://github.com/godotengine/godot/pull/88511
Currently only works with one object at a time. Multiple objects would probably be a future PR if desired.
Currently does not have a key binding by default:
Works similar to "instant transformations" in that pressing the key initiates the function, and left click commits it.
https://github.com/user-attachments/assets/d22159dd-d932-4f22-807c-49f7eea721cd
I miss a way to offset the object so that it appears outside the ground/wall though. The dragged object's collision shape AABB should be taken into account (if the dragged object is a PhysicsBody3D or CollisionShape3D).
Wouldn't this be resolved by: https://github.com/godotengine/godot/pull/88511?
Wouldn't this be resolved by: #88511?
Yes, this works perfectly :slightly_smiling_face:
I suggest binding Shift + G by default to match https://github.com/godotengine/godot/pull/78148.
Done.
Rebased and modified to work with: https://github.com/godotengine/godot/pull/88511
Thanks!
Question, in the Dev 4 snapshot blog, this video in the top post is shown, but this shows the collisionshape and mesh fully intersecting the surface (the snapping seems to be at the gizmo origin / anchor?
Question, in the Dev 4 snapshot blog, this video in the top post is shown, but this shows the collisionshape and mesh fully intersecting the surface (the snapping seems to be at the gizmo origin / anchor?
I'm not sure I understand the question, but if you're suggesting that the video in the snapshot post is somewhat misleading to the functionality in the build I would agree. This PR was created separately yet complimentary with https://github.com/godotengine/godot/pull/88511, which was also merged prior to dev 4 build, and the behavior of both is reflected within the dev4 build of the engine. The final position is offset by bounds of the object being positioned.
Would it be impossible to make the box not clip the conveyor belt, like offset the placement by half the AABB of the box? I think it would be a much more plausible scenario that you don't want the objects to intersect than that they would intersect like shown in the video.
Would it be impossible to make the box not clip the conveyor belt, like offset the placement by half the AABB of the box? I think it would be a much more plausible scenario that you don't want the objects to intersect than that they would intersect like shown in the video.
This is the behavior in the latest build. This PR was created along with #88511 but were both merged.
I suggest binding Shift + G by default to match https://github.com/godotengine/godot/pull/78148
As long as there is no solution for implementing #78148 in a way that makes everyone happy (e.g. implementing it alongside the QWER workflow, rather than overwritting/disrupting it), I would suggest to stay close to the current shortcuts?
Maybe use Shift + W or ALT + W, which are much easier to produce with the left hand.
Alternatively, W could be used as a toggle between the translation tool and the Reposition Using Collisions tool. More accurately, it would cycle through the different "Move tools". Blender does that for the selection tools:
I tried to use this in my own scene and the object I try to snap to colliders is jumping around erratically. I just wanted to check if somebody else has experienced this, before I investigate further...
That happens when the object is not filtering out its own collision which I've seen before with CSG objects but was fixed in a PR in 4.4. If you're still having that issue with something else, I recommend making an issue.
I don't use any CSG objects in the scene. I'll make an issue, thanks.