Fixes demon & Giant

This commit is contained in:
Szymon Miś
2025-08-25 11:36:50 +02:00
parent 598888bd0f
commit 775115eefa
11 changed files with 9236 additions and 183 deletions

View File

@@ -0,0 +1,23 @@
using RootMotion.FinalIK;
using UnityEngine;
public class LookAtPlayerInitialization : MonoBehaviour
{
public LookAtIK lookAtIK;
public string playerTag = "Player";
private Transform player;
private void OnEnable()
{
GameObject playerObj = GameObject.FindGameObjectWithTag(playerTag);
if (playerObj != null)
{
player = playerObj.transform;
if (lookAtIK != null)
{
lookAtIK.solver.target = player;
lookAtIK.solver.IKPositionWeight = 1f;
}
}
}
}