0

I'm new to web development.

I’ve been experiencing with Modelviewer for a while now and putting a 3D map model on a live server. However, what bothers me is that it is possible for the user to look 'under the map.' Tips on how to implement? Didn't find any tips on https://modelviewer.dev/.

Front View of the 3D-model

Here is a picture of the problem: Under View of the 3D-model

Here is the current code of the camera controls:

<model-viewer id="hotspot-camera-view-demo" src="assets/scene.gltf" camera-controls auto-rotate ar ios-src="assets/Low_Poly_Lake_Scene.usdz" camera-controls enable-pan touch-action="none" camera-orbit="-8.142746deg 68.967deg 0.6179899m" camera-target="-0.003m 0.0722m 0.0391m" field-of-view="45deg" min-field-of-view="25deg" max-field-of-view="45deg" interpolation-decay="200" min-camera-orbit="auto auto 5%" ar ar-modes="webxr scene-viewer quick-look"></model-viewer>

Asheline
  • 26
  • 4

1 Answers1

1

Now that I got it to work, it is possible to move the 3d model horizontally, but not vertically.

<model-viewer id="hotspot-camera-view-demo" src="assets/scene.gltf" camera-controls auto-rotate
    ar ios-src="assets/Low_Poly_Lake_Scene.usdz" camera-controls enable-pan touch-action="none"
    camera-orbit="0deg 75deg 25m" camera-target="-0.003m 0.0722m 0.0391m" field-of-view="45deg"
    min-field-of-view="25deg" max-field-of-view="45deg" interpolation-decay="200"
    min-camera-orbit='auto 75deg auto' max-camera-orbit= 'auto 75deg auto' ar
    ar-modes="webxr scene-viewer quick-look">

Nevertheless, I wonder if there is any way that this can be implemented such that the x-axis can't go outside of the positive values of the x-axis (top view of the 3D model).

Example:

3D-model demo

Elikill58
  • 4,050
  • 24
  • 23
  • 45
Asheline
  • 26
  • 4