added: lock-on mechanics testing
This commit is contained in:
@@ -1,5 +1,21 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public interface ILockOnTarget{
|
||||
public float lockonTargetRadius { set; }
|
||||
|
||||
Transform transform {get;}
|
||||
GameObject gameObject{ get; }
|
||||
|
||||
public Vector3 GetReticlePosition(){
|
||||
Bounds objectBounds = gameObject.GetComponent<Renderer>().bounds;
|
||||
|
||||
Vector3 reticlePosition = new Vector3(transform.position.x, transform.position.y + objectBounds.size.y, transform.position.z);
|
||||
|
||||
return reticlePosition;
|
||||
}
|
||||
}
|
||||
|
||||
public class PlayerCamera : MonoBehaviour{
|
||||
void Start(){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user