Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
void StopFlying(){
// 運動の停止
rb.velocity =;
rb.angularVelocity =;
// 初期位置に移動させる
gameObject.transform.position = initPosition;
// 距離測定中フラグをFalseにセット
isCheckingDistance = false;
void BoostSphere(){
// 向きと力の計算
Vector3 force = forceMagnitude * forceDirection;
// 力を加えるメソッド
rb.AddForce(force, ForceMode.Impulse);
// 距離測定中フラグをTrueにセット
isCheckingDistance = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.