entityinview problems?

Blitz3D Forums/Blitz3D Beginners Area/entityinview problems?

chwaga(Posted 2007) [#1]
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?


Terry B.(Posted 2007) [#2]
Make the buildings obscurers and check for entityvisible as well?


chwaga(Posted 2007) [#3]
how do i make them obscurers? that statement wasn't very explanatory


jfk EO-11110(Posted 2007) [#4]
the building needs to be pickable. see manual.


Terry B.(Posted 2007) [#5]
Entitypickmode Building,2,true

The true makes it an obscurer.


chwaga(Posted 2007) [#6]
i did that, flare still goes through


MadJack(Posted 2007) [#7]
Got some code we can have a look at?


Terry B.(Posted 2007) [#8]
Do something like this
EntityPickmode building,2,true 

If EntityInView(Light,Camera) and EntityVisible(Light,camera) 
;Do lensflare
endif



chwaga(Posted 2007) [#9]
sweet! thanks!