The trigger enter detect fast moving object more accurate

I’m working on a bow and arrow shooting scene ! when I shoot to hit a wall , I want to arrow stick in the wall , the problem is when the speed of arrow is low it works fine ! but when its fast ! its pass through the wall and sticks inside the wall , which means that the trigger detector is slow on that ! how can I make it more accurate too detect it faster ?that arrow stop out side the wall . any idea ?

Try storing the arrow’s previous transform x,y,z at the end of each FixedUpdate. Then when a collision is detected cast a ray from the previous position to the new position (not including the arrow) and see where on the target it collides and set your arrow position accordingly.

You could try changing the rigidbody’s collisionDetectionMode to ContinuousDynamic. (Unity - Scripting API: Rigidbody.collisionDetectionMode) It can have an effect on performance but it’s worth looking into.