mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Minor tutorial fixes for 3.1
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user