Skip to main content
GameDev.net gamedev.net
🔒 Locked

Look at point

Started by aker_jus Mar 10, 2003 at 5:16 AM 3 replies 200+ views
Original Post
aker_jus
aker_jus
I am making a function so my mesh can be rotated to look at a certain point and I am using D3DXMatrixLookatLH to get the matrix from the vector. This is how I multiply my matrices (without the lookat matrix)
D3DXMatrixMultiply(&meshes.attributes.mMatrix, &meshes.attributes.mScalingn, &meshes.attributes.mRotation);
D3DXMatrixMultiply(&meshes.attributes.mMatrix, &meshes.attributes.mMatrix, &meshes.attributes.mPosition);
 
Ok, the above transformation code works. But I do not know what to do with the new matrix from the LookAtLH, how to multiply it with the others. Can someone help me here? Thanks a lot
GraphicsWare|RenderTechhttp://www.graphicsware.com3D Graphics & Solutions
aker_jus
aker_jus
^up
GraphicsWare|RenderTechhttp://www.graphicsware.com3D Graphics & Solutions
aker_jus
aker_jus
bump bump bump
cant you even say something?
GraphicsWare|RenderTechhttp://www.graphicsware.com3D Graphics & Solutions
Osc
Osc
quote:

bump bump bump
cant you even say something?



Maybe if you gave people enough information to be able to answer your question then you''d get more replies ;->

You haven''t said whether you''re calculating your look matrix in world space or in the local space of the mesh.

You haven''t said how the mesh needs to be oriented to ''look'' in a given direction.

In the absence of these facts, I''d take a wild guess that you need to replace ''&meshes.attributes.mRotation'' with ''&lookMatrix'' in your first line of code.

HTH
aker_jus
aker_jus
Ok, sorry for the lack of information. I will try that.
GraphicsWare|RenderTechhttp://www.graphicsware.com3D Graphics & Solutions

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.