Tanoda
PhysicsTracker.cs
Go to the documentation of this file.
1
using
System.Collections;
2
using
System.Collections.Generic;
3
using
UnityEngine
;
4
5
public
class
PhysicsTracker
: MonoBehaviour
6
{
7
private
PhysicsHand
follow;
8
9
public
Vector3
offset
;
10
public
Vector3
offsetRotation
;
11
12
public
void
FollowThis
(
PhysicsHand
hand) => follow = hand;
13
14
15
void
FixedUpdate()
16
{
17
if
(follow)
18
{
19
follow.
MoveTo
(transform.position +
offset
, transform.rotation * Quaternion.Euler(
offsetRotation
));
20
}
21
}
22
}
PhysicsHand
Definition:
PhysicsHand.cs:6
PhysicsHand.MoveTo
void MoveTo(Vector3 position, Quaternion rotation)
Definition:
PhysicsHand.cs:31
PhysicsTracker
Definition:
PhysicsTracker.cs:6
PhysicsTracker.offsetRotation
Vector3 offsetRotation
Definition:
PhysicsTracker.cs:10
PhysicsTracker.offset
Vector3 offset
Definition:
PhysicsTracker.cs:9
PhysicsTracker.FollowThis
void FollowThis(PhysicsHand hand)
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Scripts
TestScripts
PhysicsTracker.cs
Generated by
1.9.3