Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created May 1, 2018 12:58
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/ce29ce716716e4ff7c0a29a08823f0f7 to your computer and use it in GitHub Desktop.
Save todorok1/ce29ce716716e4ff7c0a29a08823f0f7 to your computer and use it in GitHub Desktop.
Unityチュートリアル・ゴルフゲームの進行を制御するスクリプト
void BoostSphere(){
// ボールが発射される時の位置を記録
prePosition = transform.position;
// 向きと力の計算
Vector3 force = forceMagnitude * forceDirection;
// 力を加えるメソッド
rb.AddForce(force, ForceMode.Impulse);
// 距離測定中フラグをTrueにセット
isCheckingDistance = true;
// 角度矢印を非表示にする
angleArrowObject.SetActive(false);
// ボタンを押せないようにする
SetAngleButtonState(false);
// ガイドを非表示にする
guideManager.SetGuidesState(false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment