Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,094 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | 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