New answers tagged

0

You are doing more than you should to generate your arc ball matrix. The code below should be enough for your need. DirectX::XMMATRIX ComputeArcBallViewMatrix(DirectX::XMVECTOR origin,float distance,float yaw,float pitch,float roll = 0.f) { auto rotation = DirectX::XMMatrixRotationRollPitchYaw(pitch,yaw,roll); auto offset = ...


3

Your problem is that you're trying to compare floating-point numbers for equality. The matrix inversion and multiplication, however, will inevitable introduce slight rounding errors that will make the numbers in the two matrices not exactly equal. Still, let's compare your debug printouts side by side. I've deleted the M1 and TR rows, and left just the ...


1

I don't really understand your question to be honest but I think you're trying to figure out how to find the world matrix of a child node. In other words, you essentially have a scene graph with parent nodes and child nodes and you want to know how to calculate the world matrix of one of the children. Essentially it's a two step process. First you need to ...



Top 50 recent answers are included