Sign in to follow this  
vcGamer

Zooming

Recommended Posts

hi all what's the correct way of zooming into the screen, as seen in games, for instance in binoculars? currently I'm changing my camera POSITION towards the target, is it right? or I should change my approach? perhaps I can use the view matrix? please help me thanks www.galaxyroad.com

Share this post


Link to post
Share on other sites
Lower the field of view you use in your perspective matrix. Typically D3DX_PI/2 (aka 90 degrees) is good for unzoomed views. Try and experiment with various values to get the effect you want.

Share this post


Link to post
Share on other sites
Quote:
Original post by Cypher19
Lower the field of view you use in your perspective matrix. Typically D3DX_PI/2 (aka 90 degrees) is good for unzoomed views. Try and experiment with various values to get the effect you want.

This is the way to do it, if you want to know why it works pick up one of the classic texts on 3D/Mathematics.

If you pick, for example, PI/2 to start and PI/6 as your finish value and lerp between them you'll get a fairly decent zoom factor.

Just bare in mind that you can really mess with things this way - I've had a few users complain of motion sickness induced by this sort of zoom effect [smile]

hth
Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this