Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (AndrewAMD), 14,661 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Make level lights illuminate view entity. #252884
02/21/09 01:04
02/21/09 01:04
Joined: Feb 2009
Posts: 6
3
3l3k Offline OP
Newbie
3l3k  Offline OP
Newbie
3

Joined: Feb 2009
Posts: 6
I have a gun as a view entity (in first person perspective). How do I make it become illuminated by the lighting in the level?

Re: Make level lights illuminate view entity. [Re: 3l3k] #252996
02/22/09 00:47
02/22/09 00:47
Joined: Feb 2009
Posts: 6
3
3l3k Offline OP
Newbie
3l3k  Offline OP
Newbie
3

Joined: Feb 2009
Posts: 6
Come on, nobody knows how to do this?

Re: Make level lights illuminate view entity. [Re: 3l3k] #253003
02/22/09 01:33
02/22/09 01:33
Joined: Feb 2009
Posts: 19
A
Alcoriza Offline
Newbie
Alcoriza  Offline
Newbie
A

Joined: Feb 2009
Posts: 19
Have you read the magazine?

Re: Make level lights illuminate view entity. [Re: Alcoriza] #253022
02/22/09 09:15
02/22/09 09:15
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
View entities are not getting illuminated by the lightning in the level, thats because they don't exist "in the level" but only "on screen".
You could illuminated them by reading the floor brightness (use c_trace) and adjust the ambient etc. values
Another way would be to not use a view entity but a world entity, make it passable and set its znear flag so it does not get clipped into walls.
Then adjust its position and rotation to the camera position rotation.

Re: Make level lights illuminate view entity. [Re: 3l3k] #253155
02/23/09 06:07
02/23/09 06:07
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
Use a "real" entity like this:

action my_gun() // attach this action to your gun
{
while (1)
{
vec_set (my.x, vector (20, 30, 35)); // play with these values
vec_rotate (my.x, player.pan);
vec_add (my.x, player.x);
my.pan = player.pan;
wait (1);
}
}


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1