【发布时间】:2011-02-04 14:18:51
【问题描述】:
我想确定我的矩阵的方向,使其向上向量与另一个向量的方向相同。 Forward 和 Right 向量的方向无关紧要。
例如:
matrix4 m; // m.Up = 0, 1, 0
vector3 v = V3(1,0,0);
// Then I think I have to get the rotation from m.Up and v
// And then rotate the matrix accordingly
但我不知道该怎么做,我可能错了。
【问题讨论】:
-
为此使用四元数。它是完成这项工作的正确工具。
-
我认为可能有更快的方法,因为我不需要角度,只需要轴?