Last active
September 18, 2021 23:43
-
-
Save LottieVixen/1dc59f6257e16400e5f1ce02494bff82 to your computer and use it in GitHub Desktop.
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
#explaination and example (current) vector | |
#forward is a 0 or 1 indicating player intent | |
var thrust_force = Vector2(150, 0) | |
apply_impulse( Vector2.LEFT, thrust_force.rotated(global_rotation) * forward) #has a slight clockwise spin | |
apply_central_impulse( thrust_force.rotated(global_rotation) * forward) #works as expected, flies straight at the ship's heading |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment