Tanoda
SliderShadow.cs
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) Ultraleap, Inc. 2011-2020. *
3
* *
4
* Use subject to the terms of the Apache License 2.0 available at *
5
* http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6
* between Ultraleap and you, your company or other organization. *
7
******************************************************************************/
8
9
using
UnityEngine
;
10
using
System.Collections;
11
12
namespace
Leap.Unity.InputModule
{
13
public
class
SliderShadow
: MonoBehaviour {
14
public
Transform
Slider
;
15
public
Transform
Handle
;
16
17
void
Update() {
18
Vector3 LocalHandle =
Slider
.InverseTransformPoint(
Handle
.position);
19
Vector3 LocalShadow =
Slider
.InverseTransformPoint(transform.position);
20
Vector3 NewLocalShadow =
new
Vector3(LocalHandle.x, LocalHandle.y, LocalShadow.z);
21
transform.position =
Slider
.TransformPoint(NewLocalShadow);
22
}
23
}
24
}
Leap.Unity.InputModule.SliderShadow
Definition:
SliderShadow.cs:13
Leap.Unity.InputModule.SliderShadow.Handle
Transform Handle
Definition:
SliderShadow.cs:15
Leap.Unity.InputModule.SliderShadow.Slider
Transform Slider
Definition:
SliderShadow.cs:14
Leap.Unity.InputModule
Definition:
CompressibleUIEditor.cs:13
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Legacy
UIInput
Scripts
Utilities
SliderShadow.cs
Generated by
1.9.3