This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
{ |