Advertisement

Sniper Scope! A little problem...

Started by March 11, 2002 10:51 AM
7 comments, last by XaOs 22 years, 11 months ago
Hi!! I haven't started out on this yet...but i just though a little about it and ended up with not quite getting the best way on doing this... One way i though of was to just place the scope texture on the screen and translate the camera a little bit forward in the direction you are looking...but that might become a problem when those you are supposed to shot at comes between the scope pos and your original pos! If you get my point.... An the same trouble will occur if you are standing close to a wall and enables the sniper scope..then you would be able to look at the other side of the wall..a cool effect...but not wery wanted i think.. Anyone willing to share ideas, comment, etc. on this subject? It would be great to do it the right way when i finaly am to do it soner or later... Take Care - -- ---[XaOs]--- -- - [ project fy ] Edited by - XaOs on March 11, 2002 11:52:40 AM
- -- ---[XaOs]--- -- -[ Project fy ||| CyberTux ]
try gametutorials.com, they have a tutorial on masking which i think covers how to do the affect of a sniper scope

Advertisement
The usual way to do this is to decrease the FOV of your perspective matrix. This gives you an optical-zoom like effect.
AP is right on the money. You should be aware though that reducing the field of view too much will result in noticable loss in z-buffer precision.

- Pete
Te 'best' looking zoom is a 20 degree perspective. (This is the value Half-Life uses anyway)

Edited by - PyroMeistar on March 11, 2002 9:57:29 PM
Is that vertical or horizontal FOV?
Advertisement
Horizontal.

gluPerspective(20.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);
gluPerspective uses vertical field of view.
quote:
Original post by PyroMeistar
Te ''best'' looking zoom is a 20 degree perspective. (This is the value Half-Life uses anyway)





I likes Q3A''s zoom 22.5
XaOs just to give u an idea that most games uses fovy, and remember to animate its changes. ( i am sure u will )


"The Railgun Master"
DaHeR
____________________________________MSN | AIM | YIM | ICQ

This topic is closed to new replies.

Advertisement