Sign in to follow this  
Icebone1000

Confused with xnamath XMMatrixLookAtLH()

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this