/*--------------------------------------------------------------------------------------------*/ public override Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast) { pRaycast.WorldPosition = RendererUtil.GetNearestWorldPositionOnPlane(pFromWorldRay, vWorldPlane); pRaycast.WorldRotation = transform.rotation; pRaycast.WorldPlane = vWorldPlane; return GetNearestWorldPosition(pRaycast.WorldPosition); }
/*--------------------------------------------------------------------------------------------*/ public virtual Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast) { if ( ButtonRenderer != null ) { return ButtonRenderer.GetNearestWorldPosition(pFromWorldRay, out pRaycast); } if ( SliderRenderer != null ) { return SliderRenderer.GetNearestWorldPosition(pFromWorldRay, out pRaycast); } throw new Exception("No button or slider renderer."); }
/*--------------------------------------------------------------------------------------------*/ public abstract Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast);
/*--------------------------------------------------------------------------------------------*/ public override Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast) { return GetComponent<HoverShape>().GetNearestWorldPosition(pFromWorldRay, out pRaycast); }
/*--------------------------------------------------------------------------------------------*/ public override Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast) { pRaycast = new RaycastResult(); return Vector3.zero; }
/*--------------------------------------------------------------------------------------------*/ public override Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast) { if ( AllowJump ) { return GetComponent<HoverShape>().GetNearestWorldPosition(pFromWorldRay, out pRaycast); } return HandleButton.GetShape().GetNearestWorldPosition(pFromWorldRay, out pRaycast); }