Universe.Region.SceneObjectGroup.SetHoverHeight C# (CSharp) Method

SetHoverHeight() public method

Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds.
public SetHoverHeight ( float height, PIDHoverType hoverType, float tau ) : void
height float Height to hover. Height of zero disables hover.
hoverType PIDHoverType Determines what the height is relative to
tau float Number of seconds over which to reach target
return void
        public void SetHoverHeight(float height, PIDHoverType hoverType, float tau)
        {
            SceneObjectPart rootpart = m_rootPart;
            if (rootpart != null)
            {
                if (rootpart.PhysActor != null)
                {
                    if (height != 0f)
                    {
                        rootpart.PIDHoverHeight = height;
                        rootpart.PIDHoverType = hoverType;
                        rootpart.PIDTau = tau;
                        rootpart.PIDHoverActive = true;
                    }
                    else
                    {
                        rootpart.PIDHoverActive = false;
                    }
                }
            }
        }
SceneObjectGroup