作者cjcat2266 (CJ Cat)
看板GameDesign
標題Re: [請益] 四元素/RPY/LeapMotion/Unity的轉換方式
時間Sat Apr 9 02:52:05 2016
※ 引述《nfs258147 (258)》之銘言:
: 手臂相對於LM的軸定義不同,分別是:
: 「LM.X=手臂.Y」、「LM.Y=手臂.Z」、「LM.Z=手臂.(負X)」。
座標轉換
(x, y, z) -> (y, z, -x)
四原數轉換
(x, y, z, w) -> (y, z, -x, w)
C#
q = new Quaternion(q.y, q.z, -q.x, q.w);
參考資料
http://goo.gl/ECcqr2
--
Web
http://AllenChou.net
Twitter
http://twitter.com/TheAllenChou
LinkedIn
http://linkedin.com/in/MingLunChou
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 160.33.43.15
※ 文章網址: https://webptt.com/m.aspx?n=bbs/GameDesign/M.1460141530.A.E3F.html
※ 編輯: cjcat2266 (160.33.43.15), 04/09/2016 02:52:31
1F:推 nfs258147: 非常感謝CJ大提點!等等來試試 04/09 10:58