Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocationAnnotationNode labels are drawn using an offset above their location #229

Closed
halmueller opened this issue Oct 1, 2019 · 0 comments · Fixed by #230
Closed

LocationAnnotationNode labels are drawn using an offset above their location #229

halmueller opened this issue Oct 1, 2019 · 0 comments · Fixed by #230

Comments

@halmueller
Copy link
Collaborator

halmueller commented Oct 1, 2019

A LocationAnnotationNode does not appear on screen at the same spot as a LocationNode created with the same location. This appears to be intentional, caused by this line near the end of updatePositionAndScale(...):

    self.pivot = SCNMatrix4MakeTranslation(0, -1.1 * scale, 0)

I propose exposing that offset factor as a property on LocationAnnotationNode, to allow nodes to be drawn at their correct spatial location, or above it, or even below it. Call it labelYOffsetFactor.

I think it would be more intuitive to have a positive value of the property mean "up" than for it to mean "down". So the labelYOffsetFactor's default value would be 1.1, to allow current behavior. If I want no displacement, I'll set it to 0. If I want the label drawn below instead of above, I'll set it to -1.1.

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 a pull request may close this issue.

1 participant