mirror of
https://github.com/nothke/quality-control.git
synced 2025-08-30 15:33:44 +00:00
Added interaction, hand, rigidbody dragging, picking up hammer
This commit is contained in:
@@ -11,15 +11,20 @@ public class SlidingCrane : MonoBehaviour
|
||||
public Transform xTransform;
|
||||
public Transform yTransform;
|
||||
|
||||
|
||||
public float yRange = 10;
|
||||
public float xRange = 5;
|
||||
|
||||
public Transform testTgt;
|
||||
public Vector3 target;
|
||||
|
||||
public Rigidbody craneRail ;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
target = transform.position;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Update()
|
||||
@@ -30,7 +35,6 @@ public class SlidingCrane : MonoBehaviour
|
||||
|
||||
Vector3 localTarget = transform.InverseTransformPoint(target);
|
||||
|
||||
|
||||
Vector2 targetPlanar = new Vector2(localTarget.x, localTarget.z);
|
||||
|
||||
float xTgt = Mathf.InverseLerp(-xRange, xRange, targetPlanar.x);
|
||||
|
Reference in New Issue
Block a user