← Box2D
Authors:
Tags:
dependencies:
- https://github.com/korlibs/korge-box2d/tree/v0.1.2/korge-box2d##b1737ab3985c0bd3e2f002346ff2ac43ca1ebf48
Adds Box2d support to KorGE:
solidRect(920, 100).xy(0, 620).registerBodyWithFixture(type = BodyType.STATIC, friction = 0.2, restitution = 0.2)
for (n in 0 until 5) {
//fastEllipse(Size(100, 100))
circle(50f)
//ellipse(Size(50, 50))
.xy(120 + 140 * n, 246)
.anchor(Anchor.CENTER)
.registerBodyWithFixture(
type = BodyType.DYNAMIC,
linearVelocityY = 6.0,
friction = 0.2,
restitution = 0.3 + (n * 0.1)
)
}