The script spawns a bomb at the point clicked (2d Plane looking down.)
Then it ray casts from the Player-Object to the point clicked. It is Supposed to spawn the bomb at the first wall that intersects the raycast.
The Raycast is in a BombSpawn Function that is called by input from the mouse.
The Purpse of the script is to prevent the player from dropping bombs outside the room currently occupied.
The raycast only works about 75%-25% of the time.
The walls are made in modular blocks, the Colliders overlap to help prevent “Slippage”. The physics of the walls are 100% for my objects, but not raycasts.
Problems seem to be the first clicks, and angles.
Is there away to make the raycast more consistent?
Fixed,Late, and WaitForFixedUpdate didn’t help any with consistency.