CP::Shape::Segment
A line segment shape between two points.
Meant mainly as a static shape. Can be beveled in order to give them a thickness.
Constructors
Class methods
Calculate the area of a fattened (capsule shaped) line segment.
Instance methods
Unsafe. Set the radius of a segment shape.
This change is only picked up as a change to the position of the shape's surface, but not its velocity. Changing it will not result in realistic physical behavior. Only use if you know what you are doing!
Unsafe. Set the endpoints of a segment shape.
This change is only picked up as a change to the position of the shape's surface, but not its velocity. Changing it will not result in realistic physical behavior. Only use if you know what you are doing!
Let Chipmunk know about the geometry of adjacent segments to avoid colliding with endcaps.
When you have a number of segment shapes that are all joined together, things can still collide with the "cracks" between the segments. By setting the neighbor segment endpoints you can tell Chipmunk to avoid colliding with the inner parts of the crack.