Minor tutorial fixes for 3.1

This commit is contained in:
Chris Bradfield
2019-03-20 18:35:40 -07:00
parent b6ceeb1559
commit 41b67909fe
3 changed files with 6 additions and 13 deletions

View File

@@ -225,15 +225,15 @@ For example, here is the code for an "Asteroids" style spaceship:
func _integrate_forces(state):
if Input.is_action_pressed("ui_up"):
set_applied_force(thrust.rotated(rotation))
applied_force = thrust.rotated(rotation)
else:
set_applied_force(Vector2())
applied_force = Vector2()
var rotation_dir = 0
if Input.is_action_pressed("ui_right"):
rotation_dir += 1
if Input.is_action_pressed("ui_left"):
rotation_dir -= 1
set_applied_torque(rotation_dir * torque)
applied_torque = rotation_dir * torque
.. code-tab:: csharp