Godot Version
godot-4
Question
I need to check if an object is behind a wall. currently I’m using the onscreen visible notifier node, which doesn’t work because it doesn’t factor in occlusion. is there a way to check if an object is behind a wall? Ideally I’d like to avoid raycasts because It would check for the transform of the object, not the silhouette, so if the center of an object is behind a wall but a side of it isn’t, It’ll still return that the object is obscured.
maybe the onscreen visible notifier node works when the walls has a occluderinstance-node
That might be the exact solution I need, but is there a way to add that to complex geometry? like having 1 rectangular wall be able to block enemies is well and good, but if I have a full modeled environment, is there a way to do that without cutting it up into tiny chunks?
i think you can bake it, but the more precise it is the higher the performance cost
WOW 0.0
It worked, just took some trroubleshooting. If anyone else is trying to fix this weird niche problem, make an occluder instance with a box that contains all the geometry you want to occlude, and then bake it in the toolbar above the viewport
1 Like
also, make sure the occluder is a child of the object you want to do the occluding.
thanks herrspaten
1 Like
dont forget to mark this as solved
1 Like