maint: created new scene for demoing. cleaned up errors.

This commit is contained in:
Chris
2025-08-31 15:36:10 -04:00
parent 170a08355c
commit 5924479307
19 changed files with 4388 additions and 63265 deletions

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using Reset;
using Sirenix.OdinInspector;
using Unity.Cinemachine;
using UnityEngine;
@@ -52,6 +53,14 @@ public class LockOnManager : MonoBehaviour{
this.enabled = false;
return;
}
// References from camera
targetGroup = GameManager.Camera.transform.Find("Target Group").GetComponent<CinemachineTargetGroup>();
lockOnDocument = GameManager.UI.transform.Find("Lock On").GetComponent<UIDocument>();
// Set the camera's target as the player
targetGroup.Targets.Add(new CinemachineTargetGroup.Target{Object = transform, Radius = 3.5f, Weight = 1f});
GameManager.Camera.transform.Find("Cinemachine").GetComponent<CinemachineCamera>().Target.TrackingTarget = transform;
// Quick check for things in lock-on target that aren't lock-onable
if (mainTarget != null && mainTarget.gameObject.GetComponent<ILockOnTarget>() == null) {