From 63fff364e301fb16419598c04e38f1f3f334a554 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Fri, 10 Nov 2023 14:50:51 +0800 Subject: [PATCH] Update box2d.md --- docs/modules/box2d.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/modules/box2d.md b/docs/modules/box2d.md index 4f8fc24e..ab011578 100644 --- a/docs/modules/box2d.md +++ b/docs/modules/box2d.md @@ -106,8 +106,16 @@ from linalg import vec2 world = box2d.World() -# body_a is a static body with a box shape at (1, 0) +""" + 12/s +B -----> A +-|-|-|-|-|-|-|-|-|- +0 1 2 3 4 5 6 7 8 9 +""" + +# body_a is a static body with a box shape at (9, 0) body_a = box2d.Body(world) +body_a.type = 0 # static type body_a.set_box_shape(0.5, 0.5) body_a.position = vec2(9, 0) @@ -121,12 +129,6 @@ class Node: def on_box2d_post_step(self): pass -""" -B A --|-|-|-|-|-|-|-|-|- -0 1 2 3 4 5 6 7 8 9 -""" - # body_b is a dynamic body with a circle shape at (0, 0) body_b = box2d.Body(world, Node()) body_b.set_circle_shape(0.5)