コード例 #1
0
        public override void UpdateBeforeSimulation()
        {
            base.UpdateBeforeSimulation();
            this.SwapModelLogic();
            bool flag = this.SteeringLogic();

            if (!flag && (this.m_contactCountdown == 0))
            {
                this.m_lastFrameImpuse = Vector3.Zero;
                if (((this.Render == null) || ((this.Render != null) && !this.Render.UpdateNeeded)) && !base.HasDamageEffect)
                {
                    base.NeedsUpdate &= ~MyEntityUpdateEnum.EACH_FRAME;
                }
            }
            if (MyDebugDrawSettings.DEBUG_DRAW_WHEEL_PHYSICS)
            {
                MatrixD worldMatrix = base.WorldMatrix;
                MyRenderProxy.DebugDrawCross(worldMatrix.Translation, worldMatrix.Up, worldMatrix.Forward, flag ? Color.Green : Color.Red, false, false);
            }
        }