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


Transforming a ray into local space w/ scale

Recommended Posts

Hi, I have a picking ray (vOrigin, vDirection) generated from a screen point in world space, and im transforming the ray into local space of the object that i want to pick (so i can perform intersection tests in local space). This all works fine until i want to scale the object. It is acting as if i''m not scaling at all (ie. after scaling the ray it picks as if the scale is just (1,1,1)). If i multiply the ray by a scaling matrix the origin gets scaled correctly (as far as i can see). The direction vector gets scaled then normaalized so the direction vector of course remains the same. What am i doing wrong here??? Any help is much appreciated .

Share this post

Link to post
Share on other sites