View Entities and Light

Posted By: Roxas

View Entities and Light - 12/05/09 11:01

Hey guys,

I want to know if there is any possibilty to have a view entity which reacts on the lights, which are placed in WED.

And if not, I would like to know if there is another possibilty to have an entity in the view which reacts on the lights, so that it'll become darker or brighter if you're close or far from a lightsource.

Thanks in Advance~

Roxas~
Posted By: darkinferno

Re: View Entities and Light - 12/05/09 12:05

some simple options cuz am too lazy/tired to think on it more:
-dont use a view entity, use a normal entity with the ZNEAR flag
-adjust the view entities ambient based on the player ambient [if you use a player] and you could also do the same for colour
Posted By: bart_the_13th

Re: View Entities and Light - 12/05/09 12:40

I agree with DarkInferno, you should use normal entity instead view entity.
But if you still want to use view entity, you can just use c_trace to the ground below and get the ambient value to be used by the view entity... See c_trace for more information.
BTW, I guess it only work for static lights though...
Posted By: xXxGuitar511

Re: View Entities and Light - 12/06/09 22:59

Code:
VECTOR temp;
VECTOR offset;
offset.x = [dist];
offset.y = [horizontal];
offset.z = [vertical];
//
proc_mode = PROC_LATE;
vec_set(temp, offset);
vec_rotate(temp, camera.pan);
vec_add(temp, camera.x);
vec_set(my.x, temp);
vec_set(my.pan, camera.pan);
angle_rotate(my.pan, vector(180,0,0)); // OPTIONAL: rotate's the entity 180 deg so it faces camera


© 2024 lite-C Forums