I’ve currently finished doing some programming for projectiles in my game.
I couldn’t use the built in collision/Trigger system since the updates for it are FAR too slow.
Since my projectile is some what large at .5 in radius, and spherical in shape, I can’t get good results using only one raycast from the center of the object like you would with a cylinder bullet.
Using only one raycast from the center means that the projectile will only ever trigger a hit if the otherCollider covers more than .25 of the projectile’s forward surface. In simple terms the A quarter of the bullet could hit a corner of a wall but not trigger a hit.
In order to make it not have that side-effect I was forced to construct a custom function that runs a total of 5 raycast starting at the center, then the Top, Right, Down and Left sides of Projectile. This solved my problem making it always detect a collision except for a few rare possible instances.
The point of my post is to find out if there is a better way to go about this? Since running 5 ray casts on every projectile every fixed update seems terribly inefficient.