You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem with rectangle collisions is that they tend to appear to pass through objects, this is more obvious with debug turned on, but even with it off it gives a sense of oddness.
If instead of projecting a box ahead of the mouse velocity, a line was marched in that direction (ala raycasting) I think the experience would be improved.
The text was updated successfully, but these errors were encountered:
Hi @catmanjan, thanks for the idea. I actually thought about this and I'm agree with the issue rectangle passing through. I'm thinking about smarter algorithms instead of direct proportion between speed and rectangle size. However, if we use raycasting we will have two issues:
What if two buttons are in the same direction the ray points to? Which one will be chosen? Will the ray choose both of the buttons or the first one it collides?
Currently, rectangle-rectangle intersection returns a value (not true or false) so I can understand how much they intersect. If it's equal to 1.0 then they intersect fully or if it's 0.1 they intersect slightly. I'm not sure if raycasting will give similar opportunity.
Considering these two, I'm reluctant to change the current implementation but I'm open to new opinions.
What if two buttons are in the same direction the ray points to? Which one will be chosen?
Neither
Also there's issue when my cursor is on button and leaves it. Your plugin recognizes it as cursor entering button and clicks it (it's visible in permanent-down dropdown demo).
The problem with rectangle collisions is that they tend to appear to pass through objects, this is more obvious with debug turned on, but even with it off it gives a sense of oddness.
If instead of projecting a box ahead of the mouse velocity, a line was marched in that direction (ala raycasting) I think the experience would be improved.
The text was updated successfully, but these errors were encountered: