Tanoda
CenterTransformOnCam.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
public
class
CenterTransformOnCam
: MonoBehaviour {
13
public
Transform
Camera
;
14
15
16
// Update is called once per frame
17
void
Update() {
18
Vector3 centeredVector =
new
Vector3(
Camera
.position.x,
Camera
.position.y - .2f,
Camera
.position.z);
19
transform.position = centeredVector;
20
}
21
}
CenterTransformOnCam
Definition:
CenterTransformOnCam.cs:12
CenterTransformOnCam.Camera
Transform Camera
Definition:
CenterTransformOnCam.cs:13
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Modules
Hands
Examples
Scripts
CenterTransformOnCam.cs
Generated by
1.9.3