Archived

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

Yoshi

Selecting an Object in 3D

Recommended Posts

I have the following problem (solution in D3D preferred): My goal ist to select(and probably move) an object in 3D Space with my mouse. My Idea was to convert two points back to world space. First : ScreenX,ScreenY, z=0.0 Second : ScreenX,ScreenY z=1.0 Then I wanted to construct a ray beetween these two points and check my objects abgainst this ray. The first object to collide would be the one selected. But how do I convert the two points back to World Space ?

Share this post


Link to post
Share on other sites
I have a function to inverse a matrix.
But my problem is to invert the projection matrix.
Someone said to me that this isn''t possible.
D3D does the following transformations.
World,Camera,Projection,Scale and /w.
So I need to invert this matrices and select an right w.
But what is the right w?

Share this post


Link to post
Share on other sites