c# RTS style snapping of game objects
Hi I am having trouble building a snapping system. The idea is the user selects a 3d worldspaced gameObject and drags it around the screenspace and if it passes over a gameObjects bounds in worldspace then it will snap to that gameObject in worldspace when released.
What is the best way to go about this? I am not having any luck so far. I am currently using Actions, Interfaces and Classes e.g. Igrabbable, Isnappable.
Any ideas, if you need more info let me know.
Your answer
![](https://koobas.hobune.stream/wayback/20220612055757im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Touch.position is incorrectly offset 0 Answers
Get the relative dimensions of two different canvases 0 Answers
WorldToScreenPoint does not work as expected! 0 Answers
Positioning Screen Space UI element in center of a grid square? 1 Answer
What is the matrix equivalent to Camera.WorldToScreenPoint? 1 Answer