Created
October 18, 2016 00:06
-
-
Save apras/2f8062e9239241f8f141f27b0f9934d3 to your computer and use it in GitHub Desktop.
FinalIKに追加されたVRIKにて、とりあえず地面設置を行うスクリプト
This file contains 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
public class GrounderVRIK : MonoBehaviour | |
{ | |
private BipedIK m_bipedIK; | |
private GrounderBipedIK m_grounderBipedIK; | |
void Awake() | |
{ | |
this.m_bipedIK = this.GetComponent<BipedIK>(); | |
this.m_grounderBipedIK = this.GetComponent<GrounderBipedIK>(); | |
if(this.m_bipedIK != null) | |
{ | |
this.m_bipedIK.enabled = false; | |
} | |
if(this.m_grounderBipedIK != null) | |
{ | |
this.m_grounderBipedIK.enabled = true; | |
} | |
} | |
void LateUpdate() | |
{ | |
if(this.m_bipedIK != null && this.m_grounderBipedIK != null) | |
{ | |
this.m_bipedIK.UpdateBipedIK(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment