Skip to content

Instantly share code, notes, and snippets.

View TigerHix's full-sized avatar
🎯
Warudo

Tiger Tang TigerHix

🎯
Warudo
View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using UniGLTF;
using UnityEngine;
using VRM;
// This component goes on VRoid character root for animating where the eyes look at.
// The eyes can look between different targets or at specified left/right/up/down position.
// The idea is this scripts controls the position of a separate target object that must be created in the scene that the VRM look at scripts then specify as their look at target.
// That is, this does not modify what the eyes look at directly, but rather moves a target object that that eyes must look at.
@emilianavt
emilianavt / BestVTuberSoftware.md
Last active November 13, 2024 07:16
Best VTuber Software

Best VTuber software

This is a list of the most commonly used and relevant vtubing software. The "best" will always be subjective and depend on your specific requirements. Overall, the information in this list is as accurate as I could figure it out, but there might be errors or some details might become out of date. If you find anything that needs to be corrected, please let me know. You can also note it in a comment.

Additional explanations:

  • iPhone means that an iPhone is basically required
  • iFacialMocap support means that tracking data can be received from the iFacialMocap iPhone app
  • VMC protocol means that the application can send and/or receive tracking data from other VMC protocol capable applications, allowing the combination of multiple tracking methods (e.g. VSeeFace receiving VR tracking from Virtual Motion Capture and iPhone/ARKit face tracking from Waidayo)
  • Tobii means that the Tobii eye tracker is supported
/**
FinalIKを使ったLeapMotion Orion用HandController
(VRIKバージョン)
Author: MiyuMiyu (https://twitter.com/miyumiyuna5)
Source: https://qiita.com/miyumiyu/items/72b965df46a79f3ec523
Modified by: Emiliana (https://twitter.com/Emiliana_vt)
Modifications: Updated for current SDK version, supports hand position reset on tracking loss, hand mirroring and interpolation.
*/
/*
@larryhou
larryhou / Mesh.bindposes.md
Last active October 16, 2023 16:39
Unity Mesh bindposes explanation

Unity官方文档对于Mesh.bindposes的解释比较含糊,比较难以理解其含义,在这我用人话解释下。

Mesh.bindposes是一个数组,每个元素是Matrix4x4对象,是对应骨骼初始形变的逆变换,可以消除骨骼初始的形变,这样在骨骼动画里面可以用来实时计算骨骼的形变增量,然后通过骨骼权重把对应的形变作用到顶点上。

对于这个逆变换,官方的示例看起来比较抽象

bindPoses[1] = bones[1].worldToLocalMatrix * transform.localToWorldMatrix;

要理解这行代码,可以做下简单推导

idx = 0
VRMs[idx].vrm.humanoid.humanBones.forEach(({bone, node}) => {
console.log(`${bone}: ${VRMs[idx].nodes[node].name}`)
})
@ruzrobert
ruzrobert / Vibration.cs
Last active October 15, 2024 18:08
Android Vibration for Unity 3D. Supports all API: 1 - 29 (auto detect), Amplitudes, Predefined Effects, both Legacy and >=26 APIs.
using System.Diagnostics.CodeAnalysis;
using UnityEngine;
// Dont forget to add "using RDG;" to the top of your script!
namespace RDG
{
/// <summary>
/// Class for controlling Vibration. Automatically initializes before scene is loaded.
/// </summary>
public static class Vibration
@BrianMacIntosh
BrianMacIntosh / UI-Gradient.shader
Last active March 22, 2023 16:09
Shader for Unity UI that uses a four-color gradient instead of a solid color as the tint color. Improved version with Sliced support: https://gist.github.com/BrianMacIntosh/23275e79bb7489b42ad4ac0916a56824.
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
// Modified to add gradient color by Brian MacIntosh
Shader "UI/Gradient"
{
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_TopLeftColor("Gradient Top Left", Color) = (1,1,1,1)
_TopRightColor("Gradient Top Right", Color) = (1,1,1,1)
@davidfoster
davidfoster / KalmanFilterFloat.cs
Last active June 19, 2024 12:52
Simple Kalman filtering in Unity.
using System.Collections.Generic;
/// <summary>A Kalman filter implementation for <c>float</c> values.</summary>
public class KalmanFilterFloat {
//-----------------------------------------------------------------------------------------
// Constants:
//-----------------------------------------------------------------------------------------
public const float DEFAULT_Q = 0.000001f;
@karljj1
karljj1 / Unity Assembly Definition Debugger.cs
Last active March 27, 2024 17:18
Find out what assemblies are being built and how long each takes.
using System;
using System.Collections.Generic;
using System.Text;
using UnityEditor;
using UnityEditor.Compilation;
using UnityEngine;
[InitializeOnLoad]
public class AsmdefDebug
{