This topic is now archived and is closed to further replies.

JDS Games

Targeting Rect

Recommended Posts


I am trying to find a way to compute a targeting RECT for an object currently under my crosshair.

I have code based on example #17, but because of the perspective projection, the width/height grows and shrink on simply rolling the camera.

Example #17 uses the radius to compute points that are height and width dist from the center. When these points are projected and if the cam is viewing from skewed angle some points maybe closer or more dist than the center point so it's projected point will be diff and cause the resulting width/height to be diff.

In the example you never see this because the cam only moves up/down/left/right/in/out and never at rotated angles such as in my space game.

Any help Appreciated.


Jarrod Davis

[This message has been edited by JDS Games (edited October 22, 1999).]

Share this post

Link to post
Share on other sites