You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
317 B

using UnityEngine;
public class TilingFloorTrigger : MonoBehaviour {
public float MoveOffset;
public DIRECTION MoveDirection = DIRECTION.Right;
public GameObject ObjectToMove;
void OnTriggerEnter(){
if(ObjectToMove) ObjectToMove.transform.position += Vector3.right * MoveOffset * (int)MoveDirection;
}
}