Skip to content

Instantly share code, notes, and snippets.

@nklsrh
Last active December 19, 2015 13:38
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 nklsrh/5963001 to your computer and use it in GitHub Desktop.
Save nklsrh/5963001 to your computer and use it in GitHub Desktop.
// We lerp the scale back to 1
// this is done because we stretch the paddle at some points
// stretching is done when paddle touches side of table and when paddle hits ball
// by doing this here, we ensure paddle always comes back to default size
paddle2.scale.y += (1 - paddle2.scale.y) * 0.2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment