aframevr / aframe

:a: Web framework for building virtual reality experiences.
https://aframe.io/
MIT License
16.65k stars 3.96k forks source link

How to copy AFRAME scene camera/marker position to THREEJS scene camera/object? #4994

Closed neoluddite357 closed 2 years ago

neoluddite357 commented 2 years ago

I create THREEJS scene over AFRAME scene with same canvas size and trying copy AFRAME matrix/position/rotation to THREEJS scene but copied position is bit mismatch the marker. Threejs scene rotation seems to be alright, but it's object doesn't follow marker position. I also found that every object in aframe is twice bigger than threejs, like if I create new THREE.BoxGeometry(1, 1, 1, 1) in aframe and in three, in aframe it will be scaled x2 times, why? Maybe that is part of problem. How to set same size for threejs? Maybe problem is in canvas size, if canvas is too width, aframe will not work at all, also the wider canvas the less synchronous scenes.

The orange one is AFRAME object and the other one is THREEJS. example

Here's my code https://codepen.io/neoluddite/pen/rNGRZQv

dmarcos commented 2 years ago

This looks an ar.js question. We use Github for bug reports and feature requests. For usage questions I recommend joining the community on the discord server or opening a question on Stack Overflow. Nice folks there to help. Best of luck. Closing this and thanks for the understanding.

dmarcos commented 2 years ago

For ar.js bugs also consider the ar.js repo I'm not familiarized with the intricacies of the project.

neoluddite357 commented 2 years ago

This looks an ar.js question. We use Github for bug reports and feature requests. For usage questions I recommend joining the community on the discord server or opening a question on Stack Overflow. Nice folks there to help. Best of luck. Closing this and thanks for the understanding.

No, it's not. The problem is in a-frame. The a-frame marker works ok, but I can't copy it to Three.js scene, PLEASE NOTICE: I USE ONLY A-FRAME DATA (which use arjs itself, and it's just fine). I want to copy marker and camera data from AFRAME scene, not from ARJS. Reopen issue please.

dmarcos commented 2 years ago

Can you come up with a simple example without ar.js that reproduces the issue?

Preferably with glitch: https://glitch.com/edit/#!/aframe