google-ar / three.ar.js

A helper three.js library for building AR web experiences that run in WebARonARKit and WebARonARCore
https://developers.google.com/ar/develop/web/getting-started
Apache License 2.0
2.91k stars 367 forks source link

Spawn on the wall #58

Closed godlzr closed 7 years ago

godlzr commented 7 years ago

Hey, the plane detection is nice, but from the examples, I just saw floor detection, is there any way I can detect the plane of the wall, and place the object on the wall plane?

jsantell commented 7 years ago

Both ARKit and ARCore (backends on iOS/Android that power the WebARonARKit/WebARonARCore browsers) only support horizontal planes currently -- in the future if/when ARKit/ARCore add these capabilities, the AR browsers could also support them as well.

There are some creative work arounds for this, like placing an object some distance infront of the camera aligned to the wall plane (no X rotation) or detecting the edge of a horizontal plane and assuming a wall. Hope this helps!