Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
411c280
1
Ren-ame Apr 17, 2026
2527646
Add AR pet prefabs, scripts and project settings
Ren-ame Apr 22, 2026
999777f
Merge branch 'main' into branch1
Ren-ame Apr 26, 2026
1792dfd
Update lib_burst_generated.txt
Ren-ame Apr 26, 2026
ceb6794
minor upgrade
Ren-ame Apr 26, 2026
5c2a45c
Merge branch 'main' into branch1
Ren-ame Apr 27, 2026
66d51ee
Animator Controller Update
Ren-ame Apr 27, 2026
ae5dcf9
Update pet prefabs and AR placement logic
Ren-ame Apr 28, 2026
2ac73d5
Merge branch 'main' into branch1
Ren-ame Apr 28, 2026
29c8e37
Register spawned animal; update animator & burst
Ren-ame Apr 28, 2026
2604e8b
주석 복구
Ren-ame Apr 28, 2026
d8e5053
Merge branch 'main' into branch1
Ren-ame Apr 28, 2026
324c544
Merge branch 'main' into branch1
Ren-ame Apr 28, 2026
91ad97a
Merge branch 'main' into branch1
Ren-ame Apr 28, 2026
7e2332a
Update .gitignore
Ren-ame Apr 28, 2026
cebd1dc
OnPetTouched 이벤트 발생 시 AnimalMover에서 터치 애니메이션 재생
Ren-ame Apr 28, 2026
356da7b
Add touch/react behaviors, wandering; update paths
Ren-ame Apr 28, 2026
de7f9b6
1
Ren-ame Apr 28, 2026
c5c4c62
Merge branch 'main' into branch1
Ren-ame Apr 28, 2026
287c26d
펫 배고픔 애니메이션
Ren-ame Apr 28, 2026
6c9caa4
Merge branch 'main' into branch1
Ren-ame Apr 28, 2026
efe611a
기존의 명시적 Animator 할당 제거, 펫 앉을 때 카메라 바라보기
Ren-ame Apr 28, 2026
4b44765
Merge branch 'main' into branch1
Ren-ame Apr 28, 2026
a968440
Update AnimalMover.cs
Ren-ame Apr 28, 2026
e9de942
디버깅 문구 추가
Ren-ame Apr 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ AnimatorStateTransition:
- m_ConditionMode: 1
m_ConditionEvent: ReactTrigger
m_EventTreshold: 0
- m_ConditionMode: 4
m_ConditionEvent: HungerLevel
- m_ConditionMode: 2
m_ConditionEvent: IsHungry
m_EventTreshold: 50
- m_ConditionMode: 6
m_ConditionEvent: TouchIndex
Expand Down Expand Up @@ -138,7 +138,10 @@ AnimatorStateTransition:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: IsHungry
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102192097396800364}
m_Solo: 0
Expand Down
14 changes: 12 additions & 2 deletions Assets/KGB/Scripts/ARPlacementManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,20 @@ private void SpawnAnimal(Pose hitPose)
{
Vector3 spawnPosition = new Vector3(hitPose.position.x, 0f, hitPose.position.z);
_spawnedAnimal = Instantiate(_animalPrefabs[_selectedAnimalIndex], spawnPosition, hitPose.rotation);

if (_spawnedAnimal == null)
{
Debug.LogError("<color=red>ARPlacementManager:</color> Failed to instantiate prefab!");
return;
}

Debug.Log($"<color=green>ARPlacementManager:</color> Prefab spawned -> {_spawnedAnimal.name} / Position: {spawnPosition}");

_spawnedAnimal.AddComponent<AnimalMover>();
Debug.Log("<color=green>ARPlacementManager:</color> AnimalMover added");

var status = _spawnedAnimal.AddComponent<PetStatusController>();
status.SetAnimator(_spawnedAnimal.GetComponent<Animator>());
_spawnedAnimal.AddComponent<PetStatusController>();
Debug.Log("<color=green>ARPlacementManager:</color> PetStatusController added");

HJS.AR_MyPet.MyPetManager.myPetInstance?.RegisterPet(_spawnedAnimal);
}
Expand Down
8 changes: 4 additions & 4 deletions Assets/KGB/Scripts/AnimalMover.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class AnimalMover : MonoBehaviour

private Vector3 _targetPosition;
private bool _isMoving = false;
private bool _isLookingAtCamera = false;

private float _idleTimer = 0f;
private Camera _camera;
private Animator _animator;
Expand Down Expand Up @@ -46,7 +46,6 @@ private void Update()
{
if (_isMoving)
{
_isLookingAtCamera = false;
MoveToTarget();
}
else
Expand All @@ -67,8 +66,8 @@ private void DecideIdleBehavior()

if (roll == 0)
{
// 앉기 - 제자리에서 sitting 애니메이션
_isLookingAtCamera = false;
// 카메라 바라보고 앉기
LookAtCamera();
_animator.SetBool("IsWalking", false);
}
else
Expand Down Expand Up @@ -96,6 +95,7 @@ private void MoveToTarget()
_isMoving = false;
_idleTimer = 0f;
_animator.SetBool("IsWalking", false);
LookAtCamera();
}
}

Expand Down
4 changes: 4 additions & 0 deletions ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ PlayerSettings:
bundleVersion: 0.1.0
preloadedAssets:
- {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
- {fileID: 4800000, guid: c9f956787b1d945e7b36e0516201fc76, type: 3}
- {fileID: 4800000, guid: 0945859e5a1034c2cb6dce53cb4fb899, type: 3}
- {fileID: -567818772020245008, guid: 46d8f5b32de3ff54899142f12a8c12f1, type: 2}
- {fileID: 6781703603346133630, guid: 2f4279554e860004e80298147bac00aa, type: 2}
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1
Expand Down