I have a problem with raycast when shooting. When a player is standing on the ground and shooting, the raycast works correctly. But when I shoot from top to bottom, for example in a jump, the raycast often does not work. Tell me, please, how can I solve the problem?
I attach 2 gif, which shows shooting on the ground and in a jump, as well as a link to the project: https://playcanvas.com/editor/scene/694807
It works correctly: http://g.recordit.co/9MmYSi2Adp.gif
It works incorrectly: http://g.recordit.co/GpINPfwkUb.gif