Hi, I have a raycast that hits a wall and returns the hit position but I want the raycast to avoid hitting the corner or near the edge of the wall.
Is there a way to do that using raycast?
Hi, I have a raycast that hits a wall and returns the hit position but I want the raycast to avoid hitting the corner or near the edge of the wall.
Is there a way to do that using raycast?
Could use multiple raycasts (until it hits proper area),
or use first raycast to get target object, then you can get object bounds and use that to do something…
What is your actual goal that you are trying to do with the raycasts?
Thanks, object bounds seems workable, need to experiment with that.
I am using it to create blood textures on the wall but I want to avoid creating it near the corner as the texture will overshoot the wall boundary.