OrbitControls.cs
When attached to the HologramCapture game object, OrbitControl allows the user to rotate, pan, zoom, and refocus with simple mouse / multitouch inputs.
Controls
Action | Mouse | Multitouch |
---|---|---|
Rotate | Left Click + Drag | Touch + Drag |
Pan | Right Click + Drag | Two-Finger Touch + Drag |
Zoom | Scroll Wheel up | Pinch |
Refocus | Double Click | Double Tap |
Fields
float rotateSpeed
Speed at which rotation occurs.
float rotateDrag
Rate at which rotation slows down upon release.
float yMax
Maximum angle (in degrees) that rotation is permitted to see above the model. 90 means the Hologram Camera can be rotated to view from directly above, and 0 means it that no rotation above level is permitted.
float yMin
Minimum angle (in degrees) that rotation is permitted to see below the model. -90 means the Hologram Camera can be rotated to view from directly below, and 0 means it that no rotation below level is permitted.
float panSpeed
Speed at which panning occurs.
float panDrag
Rate at which panning slows down upon release.
float mouseZoomSpeed
Rate at which mouse zoom occurs.
float multitouchZoomSpeed
Rate at which multitouch zoom occurs.
float zoomDrag
Rate at which zooming slows down upon release.
float multitouchZoomThreshold
Minimum amount of distance (in pixels) required to travel to trigger zoom interaction. Helpful for not triggering zoom when user intends to translate.
float multitouchMaxJump
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.
float minCamSize
Minimum size Hologram Camera object can be due to zoom.
float maxCamSize
Maximum size Hologram Camera object can be due to zoom.
AnimationCurve refocusToPointCurve
Animation curve describing the zoom behavior when a user refocuses.
float refocusToTime
Time it takes (in seconds) to execute animation when user refocuses.
float maxDistBetweenClickMouse
Double click is ignored if the distance between two clicks (in pixels) exceeds this value.
float maxDistBetweenClickTouch
Double tap is ignored if the distance between two taps (in pixels) exceeds this value.
float doubleClickTime
Double click is ignored if the time between two clicks (in in seconds) exceeds this value.
float doubleClickTimeTouch
Double tap is ignored if the time between two taps (in in seconds) exceeds this value.
UnityEngine.EventSystems.EventSystem eventSys
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 interactions on any event system associated to this variable.
Vector2 multitouchRemapCursorY
Optional remapping parameter for touch screen position for inaccurate touch events. The two values in this Vector2 are MinY and MaxY.
Vector2 multitouchRemapCursorX
Optional remapping parameter for touch screen position for inaccurate touch events. The two values in this Vector2 are MinX and MaxX.
Last updated