• Advertisement
Sign in to follow this  

DirectX 9 D3DXIntersect with first person camera

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a first person camera setup and working fine, i am shooting a ray from the camera pos and the direction the camera is facing, when the app first starts the intersect works fine , but when i move around the object to the otherside the is no intersect anymore, why can i only intersect the pologons head on and not all around?
heres a pic to show what i mean , the space the ray is in is object space inverse of (world*view)

http://imageshack.us/f/31/fpsintersect.jpg

thanks if you can help Edited by Anddos

Share this post


Link to post
Share on other sites
Advertisement
Hard to tell anything specific without code, but are you properly transforming the ray? D3DXIntersect works in the local space of the mesh so you have to transform the ray starting point and direction into this space.

EDIT: Ouch, am I blind and missed the sentence where you were talking about the ray space or did you add it later? Edited by Tom KQT

Share this post


Link to post
Share on other sites
I'm not sure I know what you mean by "the ray is in object space inverse of (world*view)"
Make sure the ray is in the object's local space by transforming by the local object's world transform inverse

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement