This repository was archived by the owner on May 25, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ public static void createOptionMenu(IList<Option> options, Vector3 angle) {
9090 instance . _menuActive = false ;
9191
9292 instance . optionRadian = Mathf . PI * 2f / options . Count ;
93- instance . optionDistance = options . Count < 5 ? 1f : ( 0.5f / Mathf . Tan ( instance . optionRadian ) ) ;
93+ instance . optionDistance = options . Count < 5 ? 1f : ( 0.6f / Mathf . Tan ( instance . optionRadian / 2 ) ) ;
9494
9595 float accuAngle = 0f ;
9696 foreach ( Option option in options ) {
@@ -128,7 +128,7 @@ public static void clearOptionMenu() {
128128
129129 void updateOptionMenu ( ) {
130130 Vector2 haloPos = new Vector2 ( controller . controllerState . rAxis0 . x , controller . controllerState . rAxis0 . y ) ;
131- optionHalo . rectTransform . localPosition = haloPos * optionDistance ;
131+ optionHalo . rectTransform . localPosition = haloPos * ( optionDistance + 0.5f ) ;
132132 var newSelected = optionBtns [ Mathf . FloorToInt ( ( ( Mathf . Atan2 ( haloPos . y , haloPos . x ) + optionRadian / 2 + 2 * Mathf . PI ) % ( 2 * Mathf . PI ) ) / optionRadian ) ] ;
133133
134134 if ( optionSelected != null && newSelected != optionSelected ) {
You can’t perform that action at this time.
0 commit comments