Zwiep
Zwiep

Reputation: 11

Sceneform position node bottom screen

What is the vector3 for displaying something at the bottom middle of the screen like a compass? I found this: "Pose.makeTranslation(0, -0.07f, -0.2f);" but that doesnt work in with sceneform.

Upvotes: 0

Views: 553

Answers (2)

Shubham Agrawal
Shubham Agrawal

Reputation: 1300

Use this It worked in my app:

Anchor anchor = hitResult.getTrackable().createAnchor(hitResult.getHitPose().compose(Pose.makeTranslation(0,0.5f,0)));

Upvotes: 1

Steven Mohr
Steven Mohr

Reputation: 1167

If you want to position something at the bottom of the screen, like a UI control that is not part of the scene, just add it like every standard Android UI element as an Android view that is above your ArFragment or our ArSceneView.

Upvotes: 1

Related Questions