First commit
All checks were successful
Create Archive / zip (push) Successful in 9s

This commit is contained in:
2025-01-08 11:38:05 -05:00
commit b5bf47244b
380 changed files with 18381 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
using UnityEngine;
using VRC.SDK3.Components;
using VRC.SDKBase;
using VRC.Udon;
namespace UdonSharp.Examples.Utilities
{
/// <summary>
/// Follows a chosen bone on humanoid avatars using the playerapi
/// </summary>
[AddComponentMenu("Udon Sharp/Utilities/Bone Follower")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class BoneFollower : UdonSharpBehaviour
{
public HumanBodyBones trackedBone;
VRCPlayerApi playerApi;
bool isInEditor;
void Start()
{
playerApi = Networking.LocalPlayer;
isInEditor = playerApi == null;
}
void Update()
{
if (isInEditor)
return;
transform.SetPositionAndRotation(playerApi.GetBonePosition(trackedBone), playerApi.GetBoneRotation(trackedBone));
}
}
}