Example #1
0
        /// <summary>
        /// Specify the ratio at which this entity is made invisible based on distance.
        /// Ratio is 0.0 - 1.0, with 1.0 being 100% visibility regardless of distance.
        /// </summary>
        /// <param name="viewDistanceRatio">View distance ratio.</param>
        public void SetViewDistanceRatio(float viewDistanceRatio)
        {
            viewDistanceRatio = MathHelpers.Clamp01(viewDistanceRatio);

            NativeHandle.SetViewDistRatio((int)(viewDistanceRatio * 255));
        }