Added interaction, hand, rigidbody dragging, picking up hammer

This commit is contained in:
nothke
2024-08-18 13:21:38 +02:00
parent 93ecc95bfa
commit d2c3dff101
76 changed files with 5079 additions and 4 deletions

View File

@@ -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);