2023-01-22 16:38:23 +01:00
|
|
|
|
using System;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace ABI.CCK.Components
|
|
|
|
|
{
|
2024-08-03 22:24:42 +02:00
|
|
|
|
[AddComponentMenu("ChilloutVR/CVR Movement Parent")]
|
|
|
|
|
[HelpURL("https://developers.abinteractive.net/cck/")]
|
|
|
|
|
public class CVRMovementParent : MonoBehaviour, ICCK_Component
|
2023-01-22 16:38:23 +01:00
|
|
|
|
{
|
2024-08-03 22:24:42 +02:00
|
|
|
|
public enum VelocityInheritanceMode
|
|
|
|
|
{
|
|
|
|
|
None = 0,
|
|
|
|
|
Parent = 1,
|
|
|
|
|
Reference = 2
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum OrientationMode
|
|
|
|
|
{
|
|
|
|
|
Disabled = 0,
|
|
|
|
|
RotateWithParent = 1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Tooltip("Controls whether the player should rotate with the moving platform.")]
|
|
|
|
|
public OrientationMode orientationMode = OrientationMode.RotateWithParent;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Controls how the player inherits velocity from the moving platform.")]
|
|
|
|
|
public VelocityInheritanceMode velocityInheritance = VelocityInheritanceMode.Reference;
|
2023-01-22 16:38:23 +01:00
|
|
|
|
|
2024-08-03 22:24:42 +02:00
|
|
|
|
// to make the enabled checkbox display
|
|
|
|
|
private void OnEnable(){}
|
2023-01-22 16:38:23 +01:00
|
|
|
|
}
|
|
|
|
|
}
|