google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.76k stars 801 forks source link

Add position (translation) attributes #4444

Closed vortice3D closed 10 months ago

vortice3D commented 11 months ago

Hi there:

I reckon this issue appears as closed here (https://github.com/google/model-viewer/issues/426, https://github.com/google/model-viewer/issues/1118 and https://github.com/google/model-viewer/issues/1724), but I can't find any API to implement translation transform of the 3D model; only the ones about orientation and scaling (https://modelviewer.dev/examples/scenegraph#transforms).

In the same direction, the docs are talking about attributes for orientation and scale, but nothing about translation.

So, what I must do in order to elevate (offset-Y) my model some centimetres from the tracked floor?

Thanks for your time.

vortice3D commented 10 months ago

Hi:

I've being trying to resemble this functionality with the aid of the camera-target parameter. It seems to work in the VR view but, sadly, as soon as you enter the AR, only X and Y values are kept, but that is not the case with elevation (Z), what is reset.

Any help with this?

Thanks for your time.

elalish commented 10 months ago

Let's not split the discussion: #4442.