2024-08-03 22:24:42 +02:00
|
|
|
|
using System;
|
|
|
|
|
using JetBrains.Annotations;
|
|
|
|
|
using UnityEngine;
|
2023-01-22 16:38:23 +01:00
|
|
|
|
|
|
|
|
|
namespace ABI.CCK.Components
|
|
|
|
|
{
|
2024-08-03 22:24:42 +02:00
|
|
|
|
[AddComponentMenu("ChilloutVR/CVR Avatar Pickup Marker")]
|
|
|
|
|
[HelpURL("https://developers.abinteractive.net/cck/")]
|
|
|
|
|
public class CVRAvatarPickupMarker : MonoBehaviour, ICCK_Component
|
2023-01-22 16:38:23 +01:00
|
|
|
|
{
|
|
|
|
|
public string avatarGuid;
|
2024-08-03 22:24:42 +02:00
|
|
|
|
|
|
|
|
|
#region Unity Events
|
|
|
|
|
|
2023-01-22 16:38:23 +01:00
|
|
|
|
private void OnDrawGizmos()
|
|
|
|
|
{
|
|
|
|
|
Gizmos.color = Color.magenta;
|
|
|
|
|
Matrix4x4 rotationMatrix = Matrix4x4.TRS(transform.position, transform.rotation, transform.lossyScale);
|
|
|
|
|
Gizmos.matrix = rotationMatrix;
|
|
|
|
|
Gizmos.DrawWireCube(new Vector3(0, 0.75f, 0), new Vector3(1f, 1.5f, 0f));
|
|
|
|
|
|
|
|
|
|
Gizmos.DrawWireCube(new Vector3(0, 0.7f, 0), new Vector3(0.8f, 0.1f, 0f));
|
|
|
|
|
Gizmos.DrawWireCube(new Vector3(0, 0.615f, 0), new Vector3(0.6f, 0.07f, 0f));
|
|
|
|
|
Gizmos.DrawWireCube(new Vector3(0.24f, 0.28f, 0), new Vector3(0.32f, 0.42f, 0f));
|
|
|
|
|
Gizmos.DrawWireCube(new Vector3(-0.24f, 0.28f, 0), new Vector3(0.32f, 0.42f, 0f));
|
|
|
|
|
var scale = transform.lossyScale;
|
|
|
|
|
scale.Scale(new Vector3(1f, 1f, 0f));
|
|
|
|
|
rotationMatrix = Matrix4x4.TRS(transform.position, transform.rotation, scale);
|
|
|
|
|
Gizmos.matrix = rotationMatrix;
|
|
|
|
|
Gizmos.DrawWireSphere(new Vector3(0, 1.11f, 0), 0.31f);
|
|
|
|
|
}
|
2024-08-03 22:24:42 +02:00
|
|
|
|
|
|
|
|
|
#endregion Unity Events
|
|
|
|
|
|
|
|
|
|
#region Public Methods
|
|
|
|
|
|
|
|
|
|
[PublicAPI]
|
|
|
|
|
public void ShowAvatarDetailsPage()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[PublicAPI]
|
|
|
|
|
public void ChangeAvatar()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion Public Methods
|
2023-01-22 16:38:23 +01:00
|
|
|
|
}
|
|
|
|
|
}
|