gdquest-demos / godot-3-demos

Dozens of free and open source demos for the Godot game engine, version 3. Head to the link below for newer demos for Godot 4+
https://github.com/gdquest-demos/
MIT License
1.85k stars 975 forks source link

Bug: Godot Nodes 101: Raycast2D Gun Tutorial code. #56

Open rKinson opened 4 years ago

rKinson commented 4 years ago

I'm submitting a...

Bug report

What is the current behavior?

This relates to the Godot Nodes 101: Raycast2D Gun Tutorial code.

After completing the tutorial video at Godot Nodes 101: Raycast2D Gun Tutorial I move the Player up and left so it approaches a target, obstacle or turret diagonally and when pressing fire, the ray (even when in-line and within range) doesn't collide with anything so no hit is generated.

If the Player is stationary and pointing up and left with any target, obstacle or turret in-line and within range of the ray and I press fire, the ray collides and a hit is generated.

What is the expected behavior?

Moving the Player diagonally up and left whilst firing at a target that is in line and in range should produce a hit.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

  1. Enable the 'Visible Collision Shapes' option.
  2. Run the Godot Nodes 101: Raycast2D Gun Tutorial code.
  3. Do what I describe above in "What is the current behaviour" section.