Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


How to know if an object is blocking my view of a light
jorgeas80 Offline
Junior Member

Posts: 21
Threads: 7
Joined: Jan 2014
Reputation: 0
#3
RE: How to know if an object is blocking my view of a light

Many thanks for your response. I think I'm close to the solution. Let me put things more clear here.

I have a lighting device (aka lamp) connected with Penumbra: Overture via HPL1Engine. I mean, I can turn it on and off using C++ code, and even pick the color of the light (RGB). So, when I approach a light (like a candle), I turn my lamp on. When I go away from it, I turn it off. When the player uses his glowstick or flashlight, I turn my lamp on with green or white color. Etc.

I think you get the point: Light in the game --> My lamp.

I'm facing the last problem: objects blocking the light. So, if I'm close to a light in the game, I want my lamp to be turned on. But if an object is between me (the camera) and light, I want to turn off my lamp. Classic example is when I'm approaching a light (lamp turned on) but I run behind a column: the lamp is momentarily turned off.

So, in general, if I'm in the range of a light but I get objects blocking my view of it (a column, a wall, an enemy... anything), I want to detect that, to turn my lamp off. Reading your comment, I may use the fact that I know the list of static and dynamic casters associated with a Light3D object, but not sure about how, or if it's the better approach.
03-17-2014, 11:55 AM
Website Find


Messages In This Thread
RE: How to know if an object is blocking my view of a light - by jorgeas80 - 03-17-2014, 11:55 AM



Users browsing this thread: 1 Guest(s)