Explorar o código

Fix "looking around" C# example

The example was referencing a variable that did not yet exist, instead of referencing "@event", so it did not compile. This fixes that, leading to correct behaviour.
Volodymyr Sereda %!s(int64=6) %!d(string=hai) anos
pai
achega
8dcc20ad7c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tutorials/3d/using_transforms.rst

+ 1 - 1
tutorials/3d/using_transforms.rst

@@ -334,7 +334,7 @@ Example of looking around, FPS style:
 
 
     public override void _Input(InputEvent @event)
     public override void _Input(InputEvent @event)
     {
     {
-        if (mouseMotion is InputEventMouseMotion mouseMotion)
+        if (@event is InputEventMouseMotion mouseMotion)
         {
         {
             // modify accumulated mouse rotation
             // modify accumulated mouse rotation
             _rotationX += mouseMotion.Relative.x * LookAroundSpeed;
             _rotationX += mouseMotion.Relative.x * LookAroundSpeed;