Gamestudio Links
Zorro Links
Newest Posts
Black Book, 4th edition
by jcl. 03/17/26 09:28
Trying to get started...
by Lukudo. 03/16/26 09:08
ZorroGPT
by TipmyPip. 03/08/26 18:50
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 8,871 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
mredit, vestriaa, Lukudo, mldenoiser, the1
19204 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