Skip to content

Instantly share code, notes, and snippets.


crazii crazii

View GitHub Profile
crazii / gist:46ad48707b391e50c075027c58409bc7
Created Sep 30, 2019
pseudo code on Motion Matching optimization
View gist:46ad48707b391e50c075027c58409bc7
c = computeCost(...);
if( c < cost )
//normal routine
//additional check if c is too large
//the cost function is continuative and if current cost is too large, we can assume the next few one cannot be small enough.
else if(c > cost*2)
i += n; //use n from 1 to 5 or any tunable number.
crazii / HierarchyViewer.cs
Last active Aug 1, 2019
Simple skeletal animation debug viewer for Unity.
View HierarchyViewer.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HierarchyViewer : MonoBehaviour {
public Material m_Material; //better use a material that disables ZWrite & ZTest.
class Joint