How to convert a ray to model space

Started by
1 comment, last by FireSoul 18 years, 8 months ago
Hi, at the moment im trying to get picking to work, and need some help with understanding converting the ray into model space. At the moment i am using the inverse of the object matrix, this works fine whenever my camera position is at (0,0,0). Whenever the position changes the picking stops working. I would guess this could be because im either using the wrong matrix to get the inverse of, or that i have to add additional calculations to get the ray into model space. Is there just one matrix taht you you should get the inverse of, and this works for any point in the matrix, at any angle? Or is there something that i am missing? Any help is appreciated, Thanks.
Advertisement
Take the inverse of the concatenation of object and view matrix: (object * view)^-1
Thanks

This topic is closed to new replies.

Advertisement