Question by
Lee-Tarry · Sep 13, 2019 at 07:50 AM ·
raycastcollision detectionraycastingdistancemeasure
Raycast Information
Hi, I'm trying to replicate a radiation source, so the closer you get the more 'damage' it does. I'm thinking of using raycasting to do this (its a simple vector3 distance tool at the min), can raycasting give me information about a wall in-between the source and the player?
e.g. the width of the intersection/ the distance of the raycast that is inside a wall?
the idea is that I could tag a wall as concrete and then calculate the difference it would make depending where the player is and how much material is between them.
hope this makes sense, thanks!!
Comment