Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active April 24, 2018 09:42
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/1c5962fbabd648967f669ab709484908 to your computer and use it in GitHub Desktop.
Save todorok1/1c5962fbabd648967f669ab709484908 to your computer and use it in GitHub Desktop.
Unityチュートリアル・角度に合わせて矢印を動かすスクリプト。
void StopFlying(){
// 運動の停止
rb.velocity = Vector3.zero;
rb.angularVelocity = Vector3.zero;
// 初期位置に移動させる
gameObject.transform.position = initPosition;
// 距離測定中フラグをFalseにセット
isCheckingDistance = false;
// 現在の距離をリセット
SetDistanceText(0f);
// 角度矢印を表示する
angleArrowObject.SetActive(true);
// ボタンを押せるようにする
SetAngleButtonState(true);
// ガイドを表示する
guideManager.SetGuidesState(true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment