Tanoda
SimpleMatchAnchorScaleAndState.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
Leap
.
Unity
.
Interaction
;
10
using
System.Collections;
11
using
System.Collections.Generic;
12
using
UnityEngine
;
13
14
namespace
Leap.Unity.Examples
{
15
16
[AddComponentMenu(
""
)]
17
public
class
SimpleMatchAnchorScaleAndState
: MonoBehaviour {
18
19
public
AnchorableBehaviour
anchObj
;
20
21
void
Update() {
22
if
(
anchObj
!=
null
&&
anchObj
.
anchor
!=
null
&&
anchObj
.
isAttached
) {
23
anchObj
.transform.localScale =
anchObj
.
anchor
.transform.localScale;
24
25
anchObj
.gameObject.SetActive(
anchObj
.
anchor
.gameObject.activeInHierarchy);
26
27
if
(!
anchObj
.gameObject.activeInHierarchy) {
28
anchObj
.transform.position =
anchObj
.
anchor
.transform.position;
29
if
(
anchObj
.
anchorRotation
)
anchObj
.transform.rotation =
anchObj
.
anchor
.transform.rotation;
30
}
31
}
32
}
33
34
}
35
36
}
Leap.Unity.Examples.SimpleMatchAnchorScaleAndState
Definition:
SimpleMatchAnchorScaleAndState.cs:17
Leap.Unity.Examples.SimpleMatchAnchorScaleAndState.anchObj
AnchorableBehaviour anchObj
Definition:
SimpleMatchAnchorScaleAndState.cs:19
Leap.Unity.Interaction.AnchorableBehaviour
AnchorableBehaviours mix well with InteractionBehaviours you'd like to be able to pick up and place i...
Definition:
AnchorableBehaviour.cs:24
Leap.Unity.Interaction.AnchorableBehaviour.anchorRotation
bool anchorRotation
Definition:
AnchorableBehaviour.cs:183
Leap.Unity.Interaction.AnchorableBehaviour.anchor
Anchor anchor
Definition:
AnchorableBehaviour.cs:72
Leap.Unity.Interaction.AnchorableBehaviour.isAttached
bool isAttached
Definition:
AnchorableBehaviour.cs:30
Leap.Unity.Examples
Definition:
InertiaPostProcessProvider.cs:12
Leap.Unity.Interaction
Definition:
MovePoseExample.cs:11
Leap.Unity
Definition:
AssetFolderPropertyDrawer.cs:15
Leap
Definition:
AssetFolderPropertyDrawer.cs:15
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Modules
InteractionEngine
Examples
6. Dynamic UI
Scripts
SimpleMatchAnchorScaleAndState.cs
Generated by
1.9.3