/// OBJの落下
///---------------------------------------------------------------------------

        public bool frameGravityObj()
        {
            GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance();

            Vector3 movePos = trgObjPos;

            movePos.Y = 0.0f;

            /// 対象のOBJを登録
            moveCollMgr.TrgContainer.Clear();
            ctrlResMgr.CtrlStg.SetCollisionActor(moveCollMgr.TrgContainer, trgObjPos);

            shapeMove.Set(0, movePos, 0.001f);
            calCollGrav.GetMovePos(moveCollMgr, ref movePos);
            shapeMove.Set(0, trgObjPos, 0.001f);

            calCollGrav.Check(moveCollMgr, movePos);


            trgObjPos = calCollGrav.NextPos;
            setTrgObjMove(new Vector3(0.0f, 0.0f, 0.0f));

            changeTask(debugMenuTaskId.SelectObj);
            return(true);
        }
Beispiel #2
0
        /// 重力処理
        public void FrameGravity(bool flag)
        {
            if (useCollMgr != null)
            {
                useCollMgr.MoveShape.SetMult(baseMtx);
                Vector3 movePos = StaticDataList.getVectorZero();
                calCollGrav.GetMovePos(useCollMgr, ref movePos);

                if (calCollGrav.Check(useCollMgr, movePos) == true)
                {
                    /// OBJに接地
                    basePos = calCollGrav.NextPos;
                }
                else
                {
                    //設置していない
                }
            }
            Common.MatrixUtil.SetTranslate(ref baseMtx, basePos);
            playId     &= ~PlayId.Move;
            isUpdateMtx = true;
        }