Skip to content

Commit 70ac3fc

Browse files
authored
Merge pull request #8037 from fearn-e/characterbody2d-tutorial-cs-typo
C# code example bug in CharacterBody2D tutorial
2 parents 7a46f23 + 10f00f1 commit 70ac3fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tutorials/physics/using_character_body_2d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ Here's the code for the player body:
511511
velocity.Y = _jumpSpeed;
512512

513513
// Get the input direction.
514-
Vector2 direction = Input.GetAxis("ui_left", "ui_right");
514+
float direction = Input.GetAxis("ui_left", "ui_right");
515515
velocity.X = direction * _speed;
516516

517517
Velocity = velocity;

0 commit comments

Comments
 (0)