Box2D: How to get the position of a static body?

后端 未结 2 757
再見小時候
再見小時候 2021-01-16 09:13

I have a Box2D world with a mixture of static and dynamic bodies. On collisions, I can only get the positions of the dynamic ones.

Is it possible to get the position

2条回答
  •  走了就别回头了
    2021-01-16 10:14

    I found a way - in the collision, the center of the AABB will give the position

    contact.GetFixtureA().GetAABB().GetCenter()
    

提交回复
热议问题