iPhone - Collision sometimes not detected when swiping too fast

Hi guys!

I’m making a slicing game using Raycast but when I swipe across the object too fast, the collision sometimes didn’t take place. I couldn’t find any definite solution to this. I applied a Trail Renderer to show the slicing effect and the effect showed clearly that the swiping takes place across the object. Is it because of the collision method? I tried changing the collision detection in the object Rigidbody properties to Discrete, Continuous, and Continuous Dynamic but there seems to be no difference. I appreciate any tips and advice related to this problem.

Another thing, is it normal for the game to run on 30 frame per second on iPad 2?

Thanks in advance =)

If ur only using oncollision enter try using stay instead, enter can be a bit finiky for some things, if not try all 3 enter exit stay. Also are u just testing on emulater or actually putting it on ur phone. U got to take in consideration of the lag time

If you swipe too quickly, there is always a possibility that previous touch position is outside and in front of your gameobject and the current touch position is also outside but already behind your game object. Simply becayse the touch screen works descretely and cannot provide position data more frequently. I’m not sure if the described routine with colliders include continuous calculation, something tells me it rather doesn’t.

What you have to do if you want a really nice smooth experience on very fast moves is to test whether the segment betwee the two most recent touch positions intersects the collider’s/gameobject’s screen projection.

It’s similar to how collision prediction in physics works in case something flies to fast and in the current update is far before a wall, and in the next update is far after. Yet the hit is detected as they check whether the line between the two positions intersects the wall.