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

How to get the rotation values of the current scanned target #542

Open
Kikuich opened this issue Aug 22, 2024 · 1 comment
Open

How to get the rotation values of the current scanned target #542

Kikuich opened this issue Aug 22, 2024 · 1 comment

Comments

@Kikuich
Copy link

Kikuich commented Aug 22, 2024

It was mentioned on the docs that the AR engine only changes the position and the rotation of the entity in A-Frame but somehow, var rotationDegrees = this.videoPlane.getAttribute('rotation') doesn't work.

Tried getting the rotation property of both the a-entity and the a-plane, but the values don't change.

I'm planning to create a photocard that when rotated 180 degrees, plays another video and goes back to the original video when rotated back in real life.

how do I implement this?

@Kabangoeswild
Copy link

Kabangoeswild commented Jan 3, 2025

Hi I need the same, that different video are shown when rotated. In normal AR with Hiro Marker it worked but I used a different code
const markerRotation = marker.object3D.rotation;
const markerRotationX = markerRotation.x * THREE.MathUtils.RAD2DEG;
const markerRotationY = markerRotation.y * THREE.MathUtils.RAD2DEG;
but with mind-AR I could switch to image based instead of marker but this code isnt working. Also looking for a solutions

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

No branches or pull requests

2 participants