Created
August 26, 2019 14:14
-
-
Save AlexKardone/323a5b575a7eeba79a4ef32c8752d100 to your computer and use it in GitHub Desktop.
Calculate the angle of shooting
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
shapes.point.x = shapes.point.x + shapes.point.velocity * Math.cos(angle / 180 * Math.PI); | |
shapes.point.y = shapes.point.y + shapes.point.velocity * Math.sin(angle / 180 * Math.PI); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment