Access BP component from character BP

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

A “Hack” work around might sound like this (Untested)

Not sure you lights are moving or static so here we go

On begin play

  1. get the light forward vector, cast a trace far enough to hit the ground (might have to be long at some angles)
  2. Add a new collider to the light bp at the hit point, make it a sphere collider
  3. play with the size of the sphere with a little mathbased on the distance from the light to get it to “roughly” match the light hit on the ground.

This if setup to accept overlaps should give you a collider for that. You can also get it to generate hit events also for your trace check.

I managed to make a collider in a blueprint that follows the view of the light and kinda fits in with the distance shape it draws. not perfect but workable.

Ok got it now. I like this idea, but it’s gonna limit the LD/LA possibilities. It will work if the lit area is uniform/plain. Otherwise there’s gonna be issues.

I’m taking note of it if I can’t manage a more accurate solution.