Skip to content

Instantly share code, notes, and snippets.

@daichi-takezawa
Last active May 1, 2021 09:44
Show Gist options
  • Save daichi-takezawa/049a060a8ab0e15b6ce56272f1dfb253 to your computer and use it in GitHub Desktop.
Save daichi-takezawa/049a060a8ab0e15b6ce56272f1dfb253 to your computer and use it in GitHub Desktop.
public float gravityPower; //調整必要 例 - 1000
void FixedUpdate() {
Gravity();
}
void Gravity() {
if (jumpNow == true) {
rb.AddForce(new Vector3(0, gravityPower, 0));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment