Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class LineRepeater : MonoBehaviour
- {
- private Transporter _transporter;
- private void Awake()
- {
- _transporter = FindObjectOfType<Transporter>();
- }
- private void OnTriggerEnter(Collider other)
- {
- //Debug.Log("trigger enter with " + other.gameObject.name);
- if(other.gameObject.tag == "line_element")
- {
- _transporter.ResetPosition(other.gameObject.transform);
- //_transporter.ResetPosition(other.GetComponent<Rigidbody>());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement