Jump to content
  • Advertisement
Sign in to follow this  
Icebone1000

Confused with xnamath XMMatrixLookAtLH()

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

Hi, Im tryng to make the transition from d3dxmath to xnamath, but Im stucked... Everything was ok using XMFLOAT3, since is the same as using D3DXVECTOR3, but when I get on using XMMatrixLookAtLH I just figured I dont know a damn about this.. It uses FXMVECTOR as input params, I dont have idea on how initialize this with a FLOAT3 vector...The most annoying is that I cant find any exemple on internet about this! How can that be? I get on this:
	XMFLOAT3 _pos( 0.0f, 1.0f, -5.0f );
	FXMVECTOR pos = XMLoadFloat3( &_pos );

	XMFLOAT3 _aim( 0.0f, 0.0f, 0.0f );
	FXMVECTOR aim = XMLoadFloat3( &_aim );

	XMFLOAT3 _up( 0.0f, 1.0f, 0.0f );
	FXMVECTOR up = XMLoadFloat3( &_up );

	g_mView = XMMatrixLookAtLH( pos, aim, up );

But it is so overheaded, if thats the right way isnt better to use d3dxmath?

Share this post


Link to post
Share on other sites
Advertisement
FXMVECTOR is for passing parameters to functions. Use XMVECTOR and you should be fine.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!