Gameplay improvement
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user