Tag Info

New answers tagged

0

Your top code chunk is: t2 * (t1 * direction * inverse(t1)) * inverse(t2) Your bottom chunk is: t3 * direction * inverse(t3) Given that t3 = t2 * t1 It's (t2 * t1) * direction * inverse(t2 * t1) As far as my knowledge of Quaternion multiplication goes, I don't think t2 * (t1 * direction * inverse(t1)) * inverse(t2) and (t2 * t1) * direction * ...


0

I found the solution, I had to change this line: glm::mat4 MVP = Model * ViewProj; To this line glm::mat4 MVP = ViewProj * Model; I made some research and it seems that in DirectX its the other way around.


0

The problem is your World matrix multiplication order. What you do is W = T * R * S; where W is the world transform, T is translation, R is rotation, and S is scaling. You should instead use: W = S * R * T. THis is because matrix multiplication is not commutative. Hope that helps.



Top 50 recent answers are included