Fix the sector map label pivot after the CultMath sign swap
CultMath's sign(float) returns int, as HLSL does, so sign(x)/2+.5f became integer division and pinned the pivot at 0.5. Scale by .5f instead so the pivot is 0 or 1 again. The other sign( uses in Assets combine the int with a float by multiplication or compare it against a float threshold, so their values are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
422b6474ff
commit
4d89c6d932
1 changed files with 1 additions and 1 deletions
|
|
@ -148,7 +148,7 @@ public class SectorMap : MonoBehaviour
|
|||
var zoneText = zoneInstance.Label;
|
||||
zoneText.text = zone.Name;
|
||||
var zoneTextTransform = zoneText.GetComponent<RectTransform>();
|
||||
zoneTextTransform.pivot = new Vector2(sign(linkDirection.x)/2+.5f,sign(linkDirection.y)/2+.5f);
|
||||
zoneTextTransform.pivot = new Vector2(sign(linkDirection.x)*.5f+.5f,sign(linkDirection.y)*.5f+.5f);
|
||||
zoneTextTransform.localPosition = new Vector3(-linkDirection.x * LabelDistance, -linkDirection.y * LabelDistance, -1);
|
||||
|
||||
if (zone == ActionGameManager.CurrentGalaxy.Entrance)
|
||||
|
|
|
|||
Loading…
Reference in a new issue