Question by
Tmsrise · Jun 06, 2017 at 06:54 PM ·
physicsraycastvelocitycollision detectionphysics.raycast
Gun RayCast Origin lags with fast moving object. Help?
I have a gun that shoots raycasts to detect bullet collision with characters, however if the character moves relatively fast in the direction of the gun (let's say the muzzle is slightly forward and to the right of the character and the character moves in that direction) The raycast will sometimes originate inside the player or a little bit behind, resulting in basically shooting yourself. Now this is easily solved by putting the character in the ignore raycast layer, but then the character is immune to enemy raycasts :/. Tips?
I'm using "Ultra Real: Basic Weapon System" assets/scripts.
Thanks
Comment