Jump to content
  • Advertisement
Sign in to follow this  

Model Following camera fps issue

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

So I have a gun/hands model that I'm trying to make follow the camera in a standard fps style. (c++ / directx) I do some transforms in hud initialisation to get the model all lining up with my camera. I thought the best way would be to multiply the models transforms by the inverse view matrix then it would apply the same translations and rotations to the model. When I inverse the view I seem to lose the scaling information, if I don't inverse its all backwards. Reapplying the scaling doesn't work. How is this done? I suspect I'm going the wrong way about it or I need to do some form of manual matrix manipulation.
void CHud::update(float elapsedTime)
	//change health pics, weapon icons ect.

	D3DXMATRIX viewMatrix;

	D3DXMATRIX handsTransform = (*m_handsMesh->getTransform());
	handsTransform *= viewMatrix;

	m_handsMesh->FrameMove(elapsedTime, &handsTransform);


Share this post

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!