AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
LineObjectFollower.cs
Go to the documentation of this file.
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
// Licensed under the MIT License. See LICENSE in the project root for license information.
3
4
using
System
.Collections;
5
using
System
.Collections.Generic;
6
using
UnityEngine
;
7
8
namespace
HoloToolkit
.Unity.UX
9
{
10
[ExecuteInEditMode]
11
public
class
LineObjectFollower
: MonoBehaviour
12
{
13
public
Transform
Object
;
14
15
[Header(
"Follow Settings"
)]
16
[Range(0f, 1f)]
17
public
float
NormalizedDistance = 0f;
18
19
[SerializeField]
20
private
LineBase
source = null;
21
22
private
void
Update()
23
{
24
Vector3 linePoint = source.
GetPoint
(NormalizedDistance);
25
Object.position = linePoint;
26
}
27
}
28
}
System
HoloToolkit.Unity.UX.LineObjectFollower
Definition:
LineObjectFollower.cs:11
HoloToolkit.Unity.UX.LineBase
Definition:
LineBase.cs:10
HoloToolkit
HoloToolkit.Unity.UX.LineObjectFollower.Object
Transform Object
Definition:
LineObjectFollower.cs:13
UnityEngine
HoloToolkit.Unity.UX.LineBase.GetPoint
Vector3 GetPoint(float normalizedLength)
Gets a point along the line at the specified length
Definition:
LineBase.cs:291
Assets
HoloToolkit
UX
Scripts
Lines
LineObjectFollower.cs
Generated by
1.8.12