I’m working on a game where you draw lines on the screen while the left mouse button is held. One of the objectives is to make sure when you hit anything as you’re drawing, the line drawing ends. I’m using raycasting to detect what I hit, it works fine but if I move the mouse cursor too fast, the line passes through the objects on its way.
This was very confusing, so I decided to track the mouse positions on the console as I drew, I noticed that if I draw the line slowly, all the proper input get’s recorded, if I draw too fast, it does not return all the input, instead, it just skips through most of the positions between the start and end points. I did some research and I found out that if your user input is faster than the Update() function, this would happen, some suggested FixedUpdate() with some tweaking in the project settings, I tried that but still no luck.
Any ideas on how to get around this?