- Home /
How can I make raycast touch responsive with 2d world objects? Raycast misses the collider when finger is moved at faster rate.
Hi, I am developing a game in which I am drawing a line using line renderer. There are only 2 vertex counts, means line is straight just as in MS paint. However, there are some obstacles in the form of boxes in the scene, such that, when user start hovering those objects, the line should stop drawing there. Hovering is implemented using Raycast. It is working fine when line is being drawn on normal rate. However, when line is drawn at faster rate, it misses the box obstacle and line is drawn over the box. I want it to be responsive.
There is another case, when I start drawing line and quickly hovers over the box, the line stops updating(drawing) even before it reaches the contact point with the collider. I guess this iis because, I update the mouse quickly than the line is updated. So, mouse starts identifying the box before line is drawn upto the point. How can I make raycast more responsive?
Your answer
Follow this Question
Related Questions
Test line renderer collision? 1 Answer
Touch collision detection with a sprite 0 Answers
Aiming to an object (iphone game) 0 Answers
LineRenderer. Problem with ray displaying 2 Answers
iPhone touch raycasting 1 Answer