Hello all!
So, I’ve been working on my project and development has been pretty steady, until one of our artist thought a level design system of sorts would be great. I, being one of the programmers need to make it, but constructing the mechanics have been severely painful, and I have painstakingly managed to pull out some working, but buggy code. I wanted to know what the easiest way to instantiate an object at the mouse position would be… After hours of Google searches, I can’t find anything of much use. My old method used raycasts, I would make the ray variable set to the mouses position by passing it through a world space conversion. i.e.:Ray ray = Camera.main.ViewportPointToRay(Input.mousePosition) It worked, but not well. It appeared as if the position was randomly incremented when I didn’t move my mouse. Can someone tell me how I should go about this, or provide some API reference for something I can use? Thanks in advance. Also, please, if you find a solution that requires pro please do not post because our team is non-profit and cannot afford it.
Regards,
Ben