26 lines
534 B
C#
26 lines
534 B
C#
using Obvious.Soap;
|
|
using UnityEngine;
|
|
|
|
public class UI_PlayerGeoPoint : MonoBehaviour
|
|
{
|
|
public GameObjectVariable playerObject;
|
|
|
|
public Vector3 scale;
|
|
|
|
public Vector3 offset;
|
|
|
|
private RectTransform _rectTransform;
|
|
|
|
private void Awake()
|
|
{
|
|
_rectTransform = GetComponent<RectTransform>();
|
|
}
|
|
|
|
public void UpdatePlayerPosition()
|
|
{
|
|
Vector3 position = playerObject.Value.transform.position;
|
|
position = Vector3.Scale(position + offset, scale);
|
|
_rectTransform.anchoredPosition = new Vector3(position.x, position.z, 0f);
|
|
}
|
|
}
|