Enumerationmigueldeicaza.swiftgodot 0.46.0SwiftGodot
BuildMode
CollisionPolygon2D.swift:22enum BuildMode
Cases
case solids
Collisions will include the polygon and its contained area. In this mode the node has the same effect as several
ConvexPolygonShape2D
nodes, one for each convex shape in the convex decomposition of the polygon (but without the overhead of multiple nodes).case segments
Collisions will only include the polygon edges. In this mode the node has the same effect as a single
ConcavePolygonShape2D
made of segments, with the restriction that each segment (after the first one) starts where the previous one ends, and the last one ends where the first one starts (forming a closed but hollow polygon).
Other members in extension
Type members
Instance members
var buildMode: CollisionPolygon2D.BuildMode
Collision build mode. Use one of the
BuildMode
constants.var disabled: Bool
If
true
, no collisions will be detected.var oneWayCollision: Bool
If
true
, only edges that face up, relative toCollisionPolygon2D
’s rotation, will collide with other objects.var oneWayCollisionMargin: Double
The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity.
var polygon: PackedVector2Array
The polygon’s list of vertices. Each point will be connected to the next, and the final point will be connected to the first.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.