Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, TedMar), 1,031 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Checking if Entity is Visible in View Window #358720
02/12/11 22:51
02/12/11 22:51
Joined: Jul 2008
Posts: 168
8
82RJZAE Offline OP
Member
82RJZAE  Offline OP
Member
8

Joined: Jul 2008
Posts: 168
Hi, how can I determine whether an entity is visible inside the view window (the camera's view window) or not?

The num_visents function (which is used in the F11 Debug Panel) displays the total number of visible entities; however, I would like to determine whether a certain entity is visible only.

Thanks,
82RJZAE

Re: Checking if Entity is Visible in View Window [Re: 82RJZAE] #358722
02/12/11 23:06
02/12/11 23:06
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
if(!(my.eflags&CLIPPED)) {
I am visible
}

ent_pvs may be useful for you, too.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Checking if Entity is Visible in View Window [Re: 82RJZAE] #358723
02/12/11 23:10
02/12/11 23:10
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany

Re: Checking if Entity is Visible in View Window [Re: Pappenheimer] #358724
02/12/11 23:12
02/12/11 23:12
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
or vec_for_screen()

Re: Checking if Entity is Visible in View Window [Re: MrGuest] #358728
02/12/11 23:48
02/12/11 23:48
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: MrGuest
or vec_for_screen()

Way to waste resources


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Checking if Entity is Visible in View Window [Re: WretchedSid] #358826
02/13/11 17:30
02/13/11 17:30
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: JustSid
Originally Posted By: MrGuest
or vec_for_screen()

Way to waste resources
It's faster than view_check and allows for checking additional views other than &CLIPPED so how exactly is that a waste of resources? or do you have nothing useful to add?


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | 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