EntityVisible() Problem
Blitz3D Forums/Blitz3D Programming/EntityVisible() Problem
| ||
Hi, I've run into a slight problem on the level map I'm working on. I need to put a flare sprite inside a semi-transparent mesh cube in order to make a light fitting. If the flare sprite is NOT contained within the mesh cube, then I can use the following code to manage visibility: If EntityVisible(player\camera,flare\sprite) flare\alpha = 1.0 Else flare\alpha = 0.0 End If But, if the sprite's centre is inside a mesh - even a semi- transparent one (say alpha=0.5) then the EntityVisible() command treats the sprite as though it is hidden from the camera. Is there a way around this? I need to turn off the flares that are fully hidden to the camera, whilst allowing objects behind semi-transparent surfaces to be visible. Regards, Rogue Vector |
| ||
Take a look at the EntityPickMode command which lets you specify whether or not an entity obscures (gets in the way) when using EntityVisible. |
| ||
has anyone a working source? i cannot get entityvisible to work properly. i have only lame/slow linepick codearounds... sorry for digging out this old thread! |
| ||
oh boy, i used entitypickmode 3 - that doesnt work. just tried 2 and it works like a charm... |
| ||
t3K|Mac: It's always fun when you figure it out for yourself. I taught a friend's son the basics of computer programming. One thing I emphasized to him, was this: a computer does not do what you THINK you told it to do, but what you ACTUALLY told it to do. |