Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active April 15, 2018 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/7f4688ab2ce29f7ca37e71586226b29f to your computer and use it in GitHub Desktop.
Save todorok1/7f4688ab2ce29f7ca37e71586226b29f to your computer and use it in GitHub Desktop.
Unityチュートリアル・落下判定を行うスクリプト。
// メンバ変数に追加
// 落下判定用オブジェクトのタグ
string fallCheckerTag = "FallChecker";
// 間は省略
void OnTriggerEnter(Collider other){
// 衝突した相手のタグを確認する
if (other.gameObject.tag == fallCheckerTag){
// 相手が落下判定用オブジェクトだった時の処理
isBoostPressed = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment