mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
i have no fucking clue
This commit is contained in:
parent
730ff58adc
commit
f783fe612d
21 changed files with 496 additions and 49 deletions
|
@ -1,4 +1,28 @@
|
|||
using ABI_RC.Core.InteractionSystem;
|
||||
/**
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Kinsi, NotAKidOnSteam
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
**/
|
||||
|
||||
using ABI_RC.Core.InteractionSystem;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using Valve.VR;
|
||||
|
@ -7,7 +31,7 @@ namespace NAK.SmoothRay;
|
|||
|
||||
public class SmoothRayer : MonoBehaviour
|
||||
{
|
||||
internal ControllerRay ray;
|
||||
public ControllerRay ray;
|
||||
|
||||
//settings
|
||||
bool isEnabled;
|
||||
|
@ -58,16 +82,14 @@ public class SmoothRayer : MonoBehaviour
|
|||
if (pose != null)
|
||||
pose.onTransformUpdatedEvent += OnTransformUpdated;
|
||||
if (tracked != null && newPosesAction != null)
|
||||
{
|
||||
newPosesAction.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
smoothedPosition = transform.localPosition;
|
||||
smoothedRotation = transform.localRotation;
|
||||
|
||||
|
||||
// desktopvrswitch support, normal use wont run this
|
||||
if (pose != null)
|
||||
pose.onTransformUpdatedEvent -= OnTransformUpdated;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue