flagflag  If you want to see English page, please click "English" Button at Left.
1: 2015-02-26 (木) 22:16:24 iseki ソース 現: 2015-02-26 (木) 22:16:41 iseki ソース
Line 1: Line 1:
*** llLookAt()  by Janus Dugong [#wb1da18a] *** llLookAt()  by Janus Dugong [#wb1da18a]
 +
       public void llLookAt(LSL_Vector target, double strength, double damping)        public void llLookAt(LSL_Vector target, double strength, double damping)
       {        {
Line 5: Line 6:
           // Determine where we are looking from            // Determine where we are looking from
           LSL_Vector from = llGetPos();            LSL_Vector from = llGetPos();
 + 
           // normalized direction to target            // normalized direction to target
           LSL_Vector dir = llVecNorm(target - from);            LSL_Vector dir = llVecNorm(target - from);
 + 
           // Janus Dugong & Fumi.Hax            // Janus Dugong & Fumi.Hax
           if (LSL_Vector.Mag(dir)<=0.0) return;            if (LSL_Vector.Mag(dir)<=0.0) return;
Line 17: Line 18:
           LSL_Rotation rot_pth = llEuler2Rot(vec_pth);            LSL_Rotation rot_pth = llEuler2Rot(vec_pth);
           LSL_Rotation rot = rot_pth * rot_yaw;            LSL_Rotation rot = rot_pth * rot_yaw;
 + 
           // Per discussion with Melanie, for non-physical objects llLookAt appears to simply            // Per discussion with Melanie, for non-physical objects llLookAt appears to simply
           // set the rotation of the object, copy that behavior            // set the rotation of the object, copy that behavior
           PhysicsActor pa = m_host.PhysActor;            PhysicsActor pa = m_host.PhysActor;
 + 
           if (strength == 0 || pa == null || !pa.IsPhysical)            if (strength == 0 || pa == null || !pa.IsPhysical)
           {            {


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
<今日>

オンライン状況

77 人のユーザが現在オンラインです。 (15 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 77

もっと...

アクセスカウンタ

今日 : 7742774277427742
昨日 : 1753317533175331753317533
総計 : 2347088523470885234708852347088523470885234708852347088523470885
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com