Created
October 28, 2019 21:08
-
-
Save henriiquecampos/7971cd87b4881b227a35e812002086da 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
extends Node | |
export (float) var mass = 20.0 | |
func steer(current_velocity, desired_velocity): | |
var steering = desired_velocity - current_velocity | |
steering /= mass | |
steering *= -1 | |
return steering |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment