Created
June 7, 2018 08:27
-
-
Save walkies/8589db71ceecd145c21dd7f5bb3589a9 to your computer and use it in GitHub Desktop.
continuous ball movement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Update() | |
{ | |
if (rb.velocity.magnitude < roll) | |
{ | |
rb.velocity = rb.velocity.normalized * roll; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment