Orbit View - Prevent Scroll Out

Hi All,

Just curious if there is a way to prevent a user from scrolling out to far on a model when in an orbit view.

We have an object inside of a room that we would like the user to be able to orbit around, without being able to scroll outside of that room.

I know this can be stopped in any other view by simply enabling collisions but that doesn’t seem to be possible in orbit view.

1 Like

There is a setting for this, but it is not exposed in the editor. To configure it you need to edit scene.json file in your Documents\Shapespark folder, and add a maxDistance property to the orbit view. The distance passed there is in meters. Here is a sample orbit view configuration entry with this maxDistance added and set to 2.3 meters (you don’t need add or change any other property):

{
  "distance": 1.87,
  "maxDistance": 2.3,
  "hideFromMenu": false,
  "id": 4,
  "maxUpAngle": 1.57,
  "minUpAngle": 0,
  "mode": "orbit",
  "name": "orb2",
  "noPitchRotate": false,
  "panPrimary": false,
  "rotation": [
    -18.4474388560423,
    -12.1306987002867
  ],
  "sky": "default",
  "target": [
    -2.3533501625061,
    -0.154325485229492,
    3.34233707003295
  ]
}

scene.json file is saved without spaces, which makes it hard to navigate and edit, but you can get a nicely formatted version by going to the address: http://localhost:5000/scenes/YOUR-SCENE-NAME/scene.json?pretty