15 lines
323 B
C#
15 lines
323 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ReverseOnCollision : MonoBehaviour
|
|
{
|
|
|
|
[SerializeField]
|
|
GameObject other;
|
|
// Start is called before the first frame update
|
|
void OnTriggerEnter(){
|
|
other.transform.forward = -other.transform.forward ;
|
|
}
|
|
}
|