# The game character is seen or not?

This topic is 4886 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

How do I know whether a point(or a game character) in 3d is seen by the player? I tried to do the inverse of :
        // Compute the vector of the pick ray in screen space
D3DXVECTOR3 v;
v.x =  ( ( ( 2.0f * ptCursor.x ) / SCREEN_WIDTH  ) - 1 ) / matProj._11;
v.y = -( ( ( 2.0f * ptCursor.y ) / SCREEN_HEIGHT ) - 1 ) / matProj._22;
v.z =  1.0f;


but the result is the 5 digit coordinate.

##### Share on other sites
Hi there TheQuixotiC,
How are you doing?
I think what you are referring to is the method called frustum culling. It's where you extract the view frustum from the View/Projection matrix. The view frustum looks like a pyramid with it's point sliced off.

You then use an algorithm against the view frustum and the object to see if the player can "see" the object.

For a kick start I have found you a link to a tutorial on view frustum culling.

View Frustum Culling

##### Share on other sites
The technique of determining what will be on screen and what will not (in 3d) is called frustum culling.

Heres a google search with lots of info:

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633709
• Total Posts
3013481
×