Jump to content

  • Log In with Google      Sign In   
  • Create Account


DirectX 9 D3DXIntersect with first person camera


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Anddos   Members   -  Reputation: 485

Like
0Likes
Like

Posted 22 October 2012 - 10:34 PM

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, 22 October 2012 - 10:45 PM.

:)

Sponsor:

#2 Tom KQT   Members   -  Reputation: 1555

Like
0Likes
Like

Posted 23 October 2012 - 01:39 AM

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, 23 October 2012 - 01:56 AM.


#3 hupsilardee   Members   -  Reputation: 486

Like
0Likes
Like

Posted 23 October 2012 - 01:42 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS