Gameplay improvement

This commit is contained in:
2020-01-19 18:43:37 +01:00
parent f866882f24
commit 0d80cee4aa
20 changed files with 953 additions and 54 deletions

View File

@@ -5,7 +5,7 @@ using UnityEngine;
public class ForceZone : MonoBehaviour
{
public float force = 0;
public GameObject player;
public GameObject forceOrigin;
// Start is called before the first frame update
void Start()
{
@@ -20,7 +20,7 @@ public class ForceZone : MonoBehaviour
private void OnTriggerStay(Collider other)
{
Vector3 direction = other.transform.position - this.player.transform.position;
Vector3 direction = other.transform.position - this.forceOrigin.transform.position;
Debug.DrawRay(this.transform.position, direction);
Rigidbody otherRigidbody = other.transform.GetComponent<Rigidbody>();