• Advertisement
Sign in to follow this  

what space todo picking in

This topic is 2632 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

if i am rendering like this and want to pick the object which is the gun , what space do i need to convert the ray to?

D3DXMatrixTranslation(&World,Pos.x,Pos.y,Pos.z);
D3DXMatrixScaling(&gunScale,100.0f,100.0f,100.0f);
HR(GunEffect->SetMatrix(mWorldProj, &(gunScale*World*gCamera->proj())));

Thanks if you can help

Share this post


Link to post
Share on other sites
Advertisement
You can transform a world ray by the inverse of scale*translation. Be sure to transform the result by scale*translation to get the results back into the world.

Share this post


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

  • Advertisement