SegmentShape2D¶
Inherits: Shape2D < Resource < RefCounted < Object
Segment shape resource for 2D physics.
Description¶
2D segment shape to be added as a direct child of a PhysicsBody2D or Area2D using a CollisionShape2D node. Consists of two points, a
and b
.
Performance: Being a primitive collision shape, SegmentShape2D
is fast to check collisions against (though not as fast as CircleShape2D).
Properties¶
|
||
|
Property Descriptions¶
Vector2 a
Default |
|
Setter |
set_a(value) |
Getter |
get_a() |
The segment's first point position.
Vector2 b
Default |
|
Setter |
set_b(value) |
Getter |
get_b() |
The segment's second point position.