Jump to content
Sign in to follow this  
5133p39

any way to detect when is the player looking

Recommended Posts

Does anybody know about any way to detect when is the player looking through optics?

first i thought i can make custom optics, with some selection or something in memory lod, etc.

and then check AnimationPhase of that thing - and by the returned value i should be able to detect when is the player using optics and when not, and set viewDistance accordingly.

But the animation (which AnimPhase we are checking) must be defined in config.cpp, and optics is just a model, no config at all.

Is there anything in config.cpp, which could be used in similar way? - to detect when the player is looking through a scope/optics

WHY?

You know, when you are looking through the sniper scope or binoculars, you get much better FPS (because the view is clipped and zoomed and there are much less objects to display than normal), so we could set the viewDistance to bigger value.

Share this post


Link to post
Share on other sites

meh?im lost but ill put what i think ure trying to say well you should have a seperate P3D for the optics.. 3d optics isnt recommended any way as it looks crap...

Create a 2D plane, and put a texture, which looks like the optics you have made, and then goto the config and put

modelOptics="\UKF_SLMG\optic_lmg.p3d";

optics=1;

Share this post


Link to post
Share on other sites
meh?im lost but ill put what i think ure trying to say well you should have a seperate P3D for the optics.. 3d optics isnt recommended any way as it looks crap...

Create a 2D plane, and put a texture, which looks like the optics you have made, and then goto the config and put

modelOptics="\UKF_SLMG\optic_lmg.p3d";

optics=1;

thanks, but i am not asking about how to create the optics :-)

I am asking about a way which would allow me to detect when the optics is used by the player.

Share this post


Link to post
Share on other sites

There is a way to detect when the player presses their optics key by using a ghost camera. However, it easily gets garbled (third person key eliminates optics without script detecting this occurance, etc).

Share this post


Link to post
Share on other sites

thanks for the tip, but as you say, this isn't reliable enough for me. But thanks.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×