SegmentShape2D

Inherits: Shape2D < Resource < Reference < Object

Category: Core

Brief Description

Segment Shape for 2D Collision Detection.

Member Functions

Vector2 get_a ( ) const
Vector2 get_b ( ) const
void set_a ( Vector2 a )
void set_b ( Vector2 b )

Description

Segment Shape for 2D Collision Detection, consists of two points, ‘a’ and ‘b’.

Member Function Description

Vector2 get_a ( ) const

Return the first point’s position.

Vector2 get_b ( ) const

Return the second point’s position.

void set_a ( Vector2 a )

Set the first point’s position.

void set_b ( Vector2 b )

Set the second point’s position.

© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/2.1/classes/class_segmentshape2d.html