Skip to content

Instantly share code, notes, and snippets.

@henriiquecampos
Created October 28, 2019 21:08
Show Gist options
  • Save henriiquecampos/7971cd87b4881b227a35e812002086da to your computer and use it in GitHub Desktop.
Save henriiquecampos/7971cd87b4881b227a35e812002086da to your computer and use it in GitHub Desktop.
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