Skip to content

Commit

Permalink
Remove obsolete C# methods from Using RigidBody2D (#5957)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarommadsen authored Jul 29, 2022
1 parent 601a79d commit a7f7913
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tutorials/physics/physics_introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -293,16 +293,16 @@ For example, here is the code for an "Asteroids" style spaceship:
public override void _IntegrateForces(Physics2DDirectBodyState state)
{
if (Input.IsActionPressed("ui_up"))
SetAppliedForce(_thrust.Rotated(Rotation));
AppliedForce = _thrust.Rotated(Rotation);
else
SetAppliedForce(new Vector2());
AppliedForce = new Vector2();

var rotationDir = 0;
if (Input.IsActionPressed("ui_right"))
rotationDir += 1;
if (Input.IsActionPressed("ui_left"))
rotationDir -= 1;
SetAppliedTorque(rotationDir * _torque);
AppliedTorque = rotationDir * _torque;
}
}

Expand Down

0 comments on commit a7f7913

Please sign in to comment.