so you could define a world area with additonal maths to check if a location is inside the boundaries ?
I don’t get that one sorry
Anyway don’t worry is getting late here as well. Thank you for your efforts so far!
For the next time you get by, here’s a more general view : I’m trying to make the character teleport to lit surfaces. As far as I know there’s no easy way to achieve that, so I found a (i think) quite convoluted workaround with a lot of line traces involved. Working easily so far for a directional light, and now getting to point/spotlights that seem way more tricky.
The intention behind my last post is :
1- when I check for a valid TP location (using character forward vector), I need to know if it’s located within the effective area of a spotlight (a determined collider that I’m using for other things), and then trace a few units in -Z to find a ground if there’s one (hence lit surface).
2- If there’s no ground, I increment the TP location by a few units (still using fwd vector) and do another -Z check, until I find ground, or not. During this process, I need to ensure that the TP location is still within the spotlight collider.
3- then ideally, id the first light check fails, i’d check if there’s another ligth behind the first one, and repeat the TP check process. But that’s for another time