d3d里如何计算2个物体间距离
是从物体自己的世界矩阵里面取值然后运算吗?
公式是这个?
The distance between two points <Ax,Ay,Az> and <Bx,By,Bz> can be found by again using the pythagorus theorem:
dx = Ax-Bx
dy = Ay-By
dz = Az-Bz
distance = sqrt(dx*dx + dy*dy + dz*dz)
[解决办法]
这是数学问题,跟D3D没关系
[解决办法]
[解决办法]
这个问题不难思考吧