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 (TipmyPip), 18,619 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
When can the Camera see Me? #130046
05/15/07 17:21
05/15/07 17:21
Joined: Jul 2002
Posts: 93
Georgia, USA
N
Night Viper Offline OP
Junior Member
Night Viper  Offline OP
Junior Member
N

Joined: Jul 2002
Posts: 93
Georgia, USA
I'm looking for a quick and easy way to tell if a vector or invisible model is within the camera viewpoint. That way I can start an action only when it is not visible from the camera view.

Can this be done without having to compare the model's and camera's x/y coordinates and thier distance to each other, and then comparing that with the camera's angle and taking into account the camera's arc? That just seems overly complicated. Or maybe there's a good algorithm that takes all this into account in just a few lines. Any ideas?

Re: When can the Camera see Me? [Re: Night Viper] #130047
05/15/07 17:39
05/15/07 17:39
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Quote:

entity.clipped

Tells wether an entity is was clipped away by the culling process during the last frame. Can be evaluated for running entity functions - for instance, particles - depending on whether the entiy is potentially visible or not.




Re: When can the Camera see Me? [Re: HeelX] #130048
05/15/07 22:33
05/15/07 22:33
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
if (vec_to_screen(model.x,camera))
0 - Result is outside the view.
1 - Result is inside the view.


Never say never.
Re: When can the Camera see Me? [Re: tompo] #130049
05/16/07 04:41
05/16/07 04:41
Joined: Jul 2002
Posts: 93
Georgia, USA
N
Night Viper Offline OP
Junior Member
Night Viper  Offline OP
Junior Member
N

Joined: Jul 2002
Posts: 93
Georgia, USA
Thanks for the help, I've got it worked out.


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