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.
This commit is contained in:
parent
92f20fd70e
commit
2bf145fa5d
|
@ -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 New Issue