Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Chain

An empty chain of points, or empty polygon (loop). More...

Import Statement: import Felgo 3.0
Inherits:

Fixture

Properties

Detailed Description

A chain shape is a free form sequence of line segments. The chain has two-sided collision, so you can use inside and outside collision. Therefore, you may use any winding order. Connectivity information is used to create smooth collisions. WARNING: The chain will not collide properly if there are self-intersections.

Property Documentation

loop : bool

Determines if the end of the chain connects back to the beginning.


nextVertex : point

Establish connectivity to a vertex that follows the last vertex. Not used for loops.


prevVertex : point

Establish connectivity to a vertex that precedes the first vertex. Not used for loops.


vertices : list<point>

Contains a list of vertices, defined by Qt.point() objects in pixels, that make up the shape in a clockwise winding. If loop is false, the minimum number of vertices is 2. If it is true, the minimum number is 3.