entityinview problems?
Blitz3D Forums/Blitz3D Beginners Area/entityinview problems?
| ||
I've used the lens flare made by Adam Gore (reverse-engineered because it wouldnt work), and used the entityinview command to say "if this entity is in view (the light source) then make the lens flare line-up appear" but for some reason, it isn't working with it passing through buildings, AKA the entityinview is not checking with buildings, however it does work with the light getting off view from the camera (the camera turns away from the light). any ideas? |
| ||
Make the buildings obscurers and check for entityvisible as well? |
| ||
how do i make them obscurers? that statement wasn't very explanatory |
| ||
the building needs to be pickable. see manual. |
| ||
Entitypickmode Building,2,true The true makes it an obscurer. |
| ||
i did that, flare still goes through |
| ||
Got some code we can have a look at? |
| ||
Do something like thisEntityPickmode building,2,true If EntityInView(Light,Camera) and EntityVisible(Light,camera) ;Do lensflare endif |
| ||
sweet! thanks! |