Skip to content

Fix worldSpace_linkAt not choosing closest Link#46

Merged
EdNutting merged 1 commit intoTeachingTechnologistBeth:masterfrom
joedight:master
Sep 2, 2020
Merged

Fix worldSpace_linkAt not choosing closest Link#46
EdNutting merged 1 commit intoTeachingTechnologistBeth:masterfrom
joedight:master

Conversation

@joedight
Copy link
Copy Markdown
Contributor

@joedight joedight commented Sep 2, 2020

Fixes #45

@EdNutting
Copy link
Copy Markdown
Collaborator

Does this mean that if I click in completely empty space far away from any links, I might end up selecting something that is far away from where I clicked?

My instinct says a better solution is to have the search distance as a variable (instead of fixed 15) and scale it according to the current zoom level (with 15 being the base-case at the current default zoom).

@joedight
Copy link
Copy Markdown
Contributor Author

joedight commented Sep 2, 2020

I'm not entirely familiar with the codebase, but isn't this function in worldspace anyway, so we shouldn't need to worry about zoom level?
My intention here is to use 15 as the maximum distance (as it was before), but make sure that we always use a closer Link if it exists.

@EdNutting
Copy link
Copy Markdown
Collaborator

Ah I see, sorry I misunderstood the code earlier. This looks good to me then (sorry, long day syndrome :p )

@EdNutting EdNutting merged commit 33d3385 into TeachingTechnologistBeth:master Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clicking doesn't always select the nearest Link

2 participants