비트 찍기 완료 및 클로드를 통한 api작업

This commit is contained in:
jongjae0305
2026-05-20 16:44:28 +09:00
commit 2cd1be88d4
1596 changed files with 444234 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
using UnityEngine;
//검 끝에 붙일 스크립트
public class VelocityEstimator : MonoBehaviour
{
//속도값 전달용
public Vector3 Velocity { get; private set; }
private Vector3 previousPosition;
private void OnEnable()
{
previousPosition = transform.position;
}
//물리 연산 주기에 맞춰 속도 계산
private void FixedUpdate()
{
//(현재 위치 - 이전 위치) / 시간 = 속도
Velocity = (transform.position - previousPosition) / Time.fixedDeltaTime;
previousPosition = transform.position;
}
}