protected override void OnRender(Camera camera)
        {
            base.OnRender(camera);

            if (sceneNode != null)
            {
                sceneNode.Visible = Visible;
            }

            //debug draw physics
            if (EngineDebugSettings.DrawStaticPhysics && camera.Purpose == Camera.Purposes.MainCamera)
            {
                if (collisionBody != null)
                {
                    float distanceSqr     = MapBounds.GetPointDistanceSqr(camera.Position);
                    float farClipDistance = camera.FarClipDistance;
                    if (distanceSqr < farClipDistance * farClipDistance)
                    {
                        camera.DebugGeometry.SetSpecialDepthSettings(false, true);

                        const float drawAsBoundsDistance = 100;
                        if (distanceSqr < drawAsBoundsDistance * drawAsBoundsDistance)
                        {
                            collisionBody.DebugRender(camera.DebugGeometry, 0, .5f, true, false, ColorValue.Zero);
                        }
                        else
                        {
                            camera.DebugGeometry.Color = collisionBody.Sleeping ? new ColorValue(0, 0, 1, .5f) :
                                                         new ColorValue(0, 1, 0, .5f);
                            camera.DebugGeometry.AddBounds(collisionBody.GetGlobalBounds());
                        }

                        camera.DebugGeometry.RestoreDefaultDepthSettings();
                    }
                }
            }
        }