Skip to content

Commit

Permalink
Ladder marker positions now account for instance rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
KABoissonneault committed Jan 27, 2022
1 parent 1616dbb commit 6974c77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Scripts/LocationData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ public bool FindClosestMarker(EditorMarkerTypes type, Vector3 sourcePos, out Vec
continue;

// Refine to closest marker
Vector3 markerPos = transform.position + obj.pos;

Vector3 markerPos = transform.position + Location.rot * obj.pos;
float distance = Vector3.Distance(sourcePos, markerPos);
if (distance < minDistance || !foundOne)
{
Expand Down

0 comments on commit 6974c77

Please sign in to comment.