OrbitControl.cs
When attached to the Holoplay Capture game object, OrbitControl allows the user to rotate, pan, zoom, and refocus with simple mouse / multitouch inputs. Multitouch defaults are set to match the Looking Glass Pro multitouch profile.
This script should be used in conjunction with the 3D Cursor prefab.

Controls

Action
Mouse
Multitouch
Rotate
Left click and drag
Touch and drag
Pan
Right click and drag
Two-finger touch and drag
Zoom
Scroll wheel up
Pinch
Refocus
Double click
Double tap

Fields

rotateSpeed

Type: float
Speed at which rotation occurs

rotateDrag

Type: float
Rate at which rotation slows down upon release

yMax

Type: float
Maximum angle (in degrees) that rotation is permitted to see above the model. 90 means the Holoplay Capture can be rotated to view from directly above, and 0 means it that no rotation above level is permitted.

yMin

Type: float
Minimum angle (in degrees) that rotation is permitted to see below the model. -90 means the Holoplay Capture can be rotated to view from directly below, and 0 means it that no rotation below level is permitted.

panSpeed

Type: float
Speed at which panning occurs

panDrag

Type: float
Rate at which panning slows down upon release

mouseZoomSpeed

Type: float
Rate at which mouse zoom occurs

multitouchZoomSpeed

Type: float
Rate at which multitouch zoom occurs

zoomDrag

Type: float
Rate at which zooming slows down upon release

multitouchZoomThreshold

Type: float
Minimum amount of distance (in pixels) required to travel to trigger zoom interaction. Helpful for not triggering zoom when user intends to translate.

multitouchMaxJump

Type: float
If the distance between the fingers changes by this much between frames, ignore zoom interaction. Helpful if multitouch is picking up too many touch points.

minHoloplaySize

Type: float
Minimum size Holoplay Capture object can be due to zoom

maxHoloplaySize

Type: float
Maximum size Holoplay Capture object can be due to zoom

refocusToPointCurve

Type: AnimationCurve
Animation curve describing the zoom behavior when a user refocuses

refocusToTime

Type: float
Time it takes (in seconds) to execute animation when user refocuses

maxDistBetweenClickMouse

Type: float
Double click is ignored if the distance between two clicks (in pixels) exceeds this value

maxDistBetweenClickTouch

Type: float
Double tap is ignored if the distance between two taps (in pixels) exceeds this value

doubleClickTime

Type: float
Double click is ignored if the time between two clicks (in in seconds) exceeds this value

doubleClickTimeTouch

Type: float
Double tap is ignored if the time between two taps (in in seconds) exceeds this value

eventSys

Type: UnityEngine.EventSystems.EventSystem
OrbitControl will activate any time clicks and taps happen, no matter where they occur. This can present problems with 2D interface elements. OrbitControl will ignore any event system associated to this variable.

multitouchRemapCursorY

Type: Vector2
Optional remapping parameter for touch screen position for inaccurate touch events. The two values in this Vector2 are MinY and MaxY. Defaults set to match Looking Glass Pro.

multitouchRemapCursorX

Type: Vector2
Optional remapping parameter for touch screen position for inaccurate touch events. The two values in this Vector2 are MinX and MaxX. Defaults set to match Looking Glass Pro.
Last modified 6mo ago