using System; using System.Collections; using System.Collections.Generic; using Unity.Logging; using UnityEngine; namespace MAVRIC.GEEKCup { public class BoostBall : MonoBehaviour { public Transform ForceDirection; public float ForceScale = 1f; private void OnTriggerEnter(Collider other) { if (other.gameObject.TryGetComponent(out Rigidbody rigidbody)) { Log.Debug(ForceDirection.forward.normalized*ForceScale); rigidbody.AddForce(ForceDirection.forward.normalized*ForceScale, ForceMode.Impulse); } } } }