Instead of tracing from camera to mouse cursor, every frame we trace on a virtual plane ahead of us:
Start - from where the projected cursor was last frame (Previous)
End - to where the projected cursor is this frame
The (here hardcoded) Plane Origin should be the world location where you expect the fruit to pop up - you surely know where they spawn.
When visualised, this will look almost like a continues line at sufficiently high fps:
If we slow this down to 5 fps, we can better see what is going on:
You should still be able to detect anything hit along a line generated every frame.
And one more thing, if the game mechanics allows for slicing more than 1 fruit with a single slash, use Multiline Trace instead, the fruit should be using overlapping trace response for this to work.
I’m having the same problem.
At slow speed I can draw a perfect line. But when I try to draw / cast with fast movements, I have huge gaps between the traces. (Photos attached)
I was trying to use your solution but I couldn’t figure out how.