Replace UltimateXR with HurricaneVR
This commit is contained in:
28
Assets/HurricaneVR/TechDemo/Scripts/DemoPassthroughSocket.cs
Normal file
28
Assets/HurricaneVR/TechDemo/Scripts/DemoPassthroughSocket.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using HurricaneVR.Framework.Core.Grabbers;
|
||||
|
||||
namespace HurricaneVR.TechDemo.Scripts
|
||||
{
|
||||
public class DemoPassthroughSocket : HVRSocket
|
||||
{
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
|
||||
ScaleGrabbable = false;
|
||||
GrabbableMustBeHeld = true;
|
||||
GrabsFromHand = true;
|
||||
CanRemoveGrabbable = false;
|
||||
ParentDisablesGrab = true;
|
||||
}
|
||||
|
||||
protected override void OnGrabbed(HVRGrabArgs args)
|
||||
{
|
||||
AllowGrabbing = false;
|
||||
AllowHovering = false;
|
||||
args.Cancel = true;
|
||||
Grabbed.Invoke(this, args.Grabbable);
|
||||
ForceRelease();
|
||||
PlaySocketedSFX(args.Grabbable.Socketable);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user