IMHOTEP Framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
Properties
Pages
Assets
Core
Util
ModelMover.cs
1
using
System;
2
using
UnityEngine;
3
4
public
class
ModelMover
: MonoBehaviour
5
{
6
public
float
smoothTime = 0.3f;
7
public
Vector3 targetPosition = Vector3.zero;
8
9
private
Vector3 currentVelocity = Vector3.zero;
10
11
public
void
Start()
12
{
13
targetPosition = transform.localPosition;
14
}
15
16
void
Update()
17
{
18
transform.localPosition = Vector3.SmoothDamp(transform.localPosition, targetPosition, ref currentVelocity, smoothTime);
19
}
20
}
21
ModelMover
Definition:
ModelMover.cs:4
Generated by
1.8.6