Skip to content

Instantly share code, notes, and snippets.

View crazii's full-sized avatar

crazii crazii

View GitHub Profile
@crazii
crazii / gist:46ad48707b391e50c075027c58409bc7
Created September 30, 2019 10:44
pseudo code on Motion Matching optimization
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
crazii / HierarchyViewer.cs
Last active August 1, 2019 04:04
Simple skeletal animation debug viewer for Unity.
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
{