
blue screen panel 3d model
using UnityEngine; public class KamikazeMovement : MonoBehaviour { [Header("타겟 설정")] public Transform target; // 추적할 타겟 (예: 플레이어) [Header("이동 설정")] public float movementSpeed = 10f; // 카미카제 속도 public float turnSpeed = 5f; // 타겟으로 회전하는 속도 [Header("폭발 설정")] public float explosionDistance = 1.5f; // 타겟에서 얼마나 가까이에서 폭발해야 하는가? void Update() { // 타겟이 지정되지 않은 경우 아무 동작도 수행하지 않음 if (target == null) return; // 타겟까지의 거리 계산 float distance = Vector3.Distance(transform.position, target.position); // 폭발 거리에서 멀리 떨어져 있으면 목표물을 향해 방향을 잡고 이동합니다. if (distance > explosionDistance) { // 목표물을 향한 방향(회전) Vector3 yon = (target.position - transform.position).normalized; Quaternion targetRotation = Quaternion.LookRotation(yon); transform.rotation = Quaternion
Tripo H3.1