Merge pull request #4337 from dubbl/patch-1

make example asteroids spaceship fly up/forward
This commit is contained in:
Nathan Lovato
2020-11-26 08:31:59 -06:00
committed by GitHub

View File

@@ -261,7 +261,7 @@ For example, here is the code for an "Asteroids" style spaceship:
extends RigidBody2D
var thrust = Vector2(0, 250)
var thrust = Vector2(0, -250)
var torque = 20000
func _integrate_forces(state):
@@ -280,7 +280,7 @@ For example, here is the code for an "Asteroids" style spaceship:
class Spaceship : RigidBody2D
{
private Vector2 _thrust = new Vector2(0, 250);
private Vector2 _thrust = new Vector2(0, -250);
private float _torque = 20000;
public override void _IntegrateForces(Physics2DDirectBodyState state)