how to rotate all objects by their own centers and then translate them to the real position (it isn't working)

孤者浪人 提交于 2019-11-28 13:03:16

if you want to rotate object locally to its own coordinate system then do this:

M=inverse(inverse(M)*rotation_matrix);

[edit1] more about relation between M and object which coordinate system it represents

look here: transform matrix anatomy

M origin is usually the middle of object (or point which is center of rotation movements). Axises of M are usually aligned with object for example in airplanes the X axis is usually the fly direction. I am more used to:

  • +z axis as forward direction movement
  • +x as right, -x as left
  • +y as up and -y as down

pith,yaw,roll are then object local rotations around x,y,z

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!