Gamestudio Links
Zorro Links
Newest Posts
webGL
by Ice2642. 11/17/25 21:27
Camera always moves upwards?
by NeoDumont. 11/17/25 09:56
Future of ZorroHFT
by TipmyPip. 11/16/25 13:52
COT Download with Quandl does not work
by Petra. 11/15/25 09:35
Training with the R bridge does not work
by Petra. 11/15/25 09:31
Zorro 2.70
by jcl. 11/15/25 08:43
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, SkinnyApe, 1 invisible), 7,580 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
SkinnyApe, tritom, sheliepaley, Blueguy, blobplayintennis
19179 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