Add ultimate xr
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// <copyright file="UxrHapticImpactEventArgs.cs" company="VRMADA">
|
||||
// Copyright (c) VRMADA, All rights reserved.
|
||||
// </copyright>
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UltimateXR.Haptics.Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// EventArgs for events generated by a <see cref="UxrHapticOnImpact" /> component.
|
||||
/// </summary>
|
||||
public class UxrHapticImpactEventArgs : EventArgs
|
||||
{
|
||||
#region Public Types & Data
|
||||
|
||||
/// <summary>
|
||||
/// Gets the raycast hit information.
|
||||
/// </summary>
|
||||
public RaycastHit HitInfo { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the normalized hit force (0 = min, 1 = max).
|
||||
/// </summary>
|
||||
public float ForceT { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the tip velocity.
|
||||
/// </summary>
|
||||
public Vector3 Velocity { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the angle between hit transform world forward and hit transform world velocity.
|
||||
/// </summary>
|
||||
public float AngleForwardVelocity { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the angle between hit transform world forward and -normal.
|
||||
/// </summary>
|
||||
public float AnglePenetration { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors & Finalizer
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="hitInfo">Hit information</param>
|
||||
/// <param name="forceT">Hit force</param>
|
||||
/// <param name="velocity">Hit velocity</param>
|
||||
/// <param name="angleForwardVelocity">Angle between hit transform world forward and hit transform world velocity</param>
|
||||
/// <param name="anglePenetration">Angle between hit transform world and -normal</param>
|
||||
public UxrHapticImpactEventArgs(RaycastHit hitInfo, float forceT, Vector3 velocity, float angleForwardVelocity, float anglePenetration)
|
||||
{
|
||||
HitInfo = hitInfo;
|
||||
ForceT = forceT;
|
||||
Velocity = velocity;
|
||||
AngleForwardVelocity = angleForwardVelocity;
|
||||
AnglePenetration = anglePenetration;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user