Skip to content

Instantly share code, notes, and snippets.

@walkies
Created June 7, 2018 08:27
Show Gist options
  • Save walkies/8589db71ceecd145c21dd7f5bb3589a9 to your computer and use it in GitHub Desktop.
Save walkies/8589db71ceecd145c21dd7f5bb3589a9 to your computer and use it in GitHub Desktop.
continuous ball movement
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