So I’ve got a simple little instantiate blood code gong on here which I’m using with a raycast I use for shooting and bulletholes, it sort of works, however for some reason it seems to be completely ignoring the floor below it which is something I obviously don’t want.
is this because of me using purely vector3.down? I incorrectly assumed that combined with the hit.point it would simply instantiate onto the floor by default because there is a collider there. Or is it perhaps that because I this particular script looking for something with an enemy tag this is why the blood is ignoring the floor? Nah, just double checked to be safe, nothing like that.
What’s hit here? A RaycastHit, obviously, but what raycast? A raycast for shooting, or?
Vector3 down seems fishy, unless you’re completely sure your raycast always hits things exactly one meter above ground. The LookRotation also seems strange - you want the blood splatter to look in direction of the hit’s normal? That’s kind of a random direction, and if it’s a blood splatter decal, you probably always want it facing away from the ground, no?
Guess I blatantly need to have a rethink I thought I could simply use the raycast that I’m shooting to calculate the blood but I think I’m going to have to make an entirely new raycast shoot downwards when it hits the enemy tag so this all works as was suggested to me awhile back. Like you say, I can’t just cheat and instantiate one unit down. Seems no matter what for this kind of thing raycasts are often necessary if you want an object to physcally hit something.