Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active April 13, 2018 14:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Unityチュートリアル・ボールの飛距離とハイスコアをゲーム画面に表示するスクリプト。
void StopFlying(){
// 運動の停止
rb.velocity = Vector3.zero;
rb.angularVelocity = Vector3.zero;
// 初期位置に移動させる
gameObject.transform.position = initPosition;
// 距離測定中フラグをFalseにセット
isCheckingDistance = false;
// 現在の距離をリセット
SetDistanceText(0f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment