Merge pull request #49474 from nekomatata/line-2d-upward
Make LineShape2D normal point upwards by default
This commit is contained in:
commit
df170c8af0
2 changed files with 4 additions and 3 deletions
|
@ -14,8 +14,8 @@
|
|||
<member name="distance" type="float" setter="set_distance" getter="get_distance" default="0.0">
|
||||
The line's distance from the origin.
|
||||
</member>
|
||||
<member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2(0, 1)">
|
||||
The line's normal.
|
||||
<member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2(0, -1)">
|
||||
The line's normal. Defaults to [code]Vector2.UP[/code].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue