|
|
Re: Illuminating camera
[Re: Aku_Aku]
#386264
10/31/11 18:42
10/31/11 18:42
|
Joined: Oct 2008
Posts: 513
Carlos3DGS
User
|
User
Joined: Oct 2008
Posts: 513
|
I am not sure what you are asking, but if I understood you correctly... just attach this action to the entity you want to be illuminated:
action illuminate_me()
{
my.ambient=0;
var dist;
while(1)
{
dist=vec_dist(my.x,camera.x);
if(dist<100)
{
my.ambient=100-dist;
}
else
{
my.ambient=0;
}
wait(1);
}
}
if the camera is more than 100 away from your entity the entity is not illuminated, if the camera is closer than 100 to the entity then the closer the camera is the more it will be illuminated
|
|
|
Re: Illuminating camera
[Re: Carlos3DGS]
#386268
10/31/11 19:50
10/31/11 19:50
|
Joined: Sep 2009
Posts: 1,034 Budapest
Aku_Aku
OP
Serious User
|
OP
Serious User
Joined: Sep 2009
Posts: 1,034
Budapest
|
I am sorry. Not the camera but the entity what was attached to that does the illuminating effect somehow. Edit: The problem as turned out, i am moving an entity "A" toward to another entity "B". Both of them have the ambient and albedo are zero. Although the values are zero the "B" entity gets more and more light and gradually is illuminated more and more. What could be the reason of this?
Last edited by Aku_Aku; 10/31/11 20:04.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|