SW 중심대학 OSS GIT 서버
박건태, 이승준, 고기완, 이준호
새로운 배포
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.
|
|
using ARLocation;using System.Collections;using System.Collections.Generic;using UnityEngine;
public class ArrowControl : MonoBehaviour{ public GameObject arrowPostion; public Camera myPosition; public GameObject arrowColor; public Material[] arrowMaterial;
private void FixedUpdate() { if (Vector3.Distance(arrowPostion.transform.position,Camera.main.transform.position) >= 10f) //화살의 위치와 카메라의 위치
{ arrowPostion.GetComponent<MoveAlongPath>().PlaybackSettings.Speed = 0f; arrowColor.GetComponent<MeshRenderer>().material = arrowMaterial[1]; } else { arrowPostion.GetComponent<MoveAlongPath>().PlaybackSettings.Speed = 3f; arrowColor.GetComponent<MeshRenderer>().material = arrowMaterial[0]; } }}
|