开发者

Why small shapes tend to move left side when using Box2D JS?

开发者 https://www.devze.com 2023-03-25 17:24 出处:网络
I made a small example of Box2d JS. There are small ball objects (8 vertex ball). You can put the ball where you like.

I made a small example of Box2d JS. There are small ball objects (8 vertex ball). You can put the ball where you like.

The demo URL is http://nmi.jp/working/box2d/eight.html

I can't understand why the balls move left withou开发者_开发知识库t any collisions. Does anyone can explain the reason?


何回か試していると、右にも転がりますよ。The shape is bouncing on one corner of the octagon, which does not always give a perfectly vertical collision response. It's hard to tell the edges of the octagon with such a small shape, but make the shape bigger and it should become obvious.

0

精彩评论

暂无评论...
验证码 换一张
取 消