diff options
| author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-06-09 17:33:17 -0700 |
|---|---|---|
| committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-06-18 09:14:06 -0700 |
| commit | 2bf145fa5d3efaea6d0e108da19c212ceeff6505 (patch) | |
| tree | 6ad4d960ff02019388f9da4a1449169eb2f8dfa7 /scene | |
| parent | 92f20fd70e6957cd65ccb7837fdc28f9b1e4a315 (diff) | |
Make LineShape2D normal point upwards by default
Allows line shapes to collide with objects falling from the top by
default, which makes more sense for the most common cases.
Diffstat (limited to 'scene')
| -rw-r--r-- | scene/resources/line_shape_2d.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/resources/line_shape_2d.h b/scene/resources/line_shape_2d.h index 9f0405ad29..210a1aa9e6 100644 --- a/scene/resources/line_shape_2d.h +++ b/scene/resources/line_shape_2d.h @@ -36,7 +36,8 @@ class LineShape2D : public Shape2D { GDCLASS(LineShape2D, Shape2D); - Vector2 normal = Vector2(0, 1); + // LineShape2D is often used for one-way platforms, where the normal pointing up makes sense. + Vector2 normal = Vector2(0, -1); real_t distance = 0.0; void _update_shape(); |