Physicsbody doesn't adhere to node's anchor point

前端 未结 7 1227
陌清茗
陌清茗 2020-12-09 15:09

My scene has a bunch of rectangles with physics bodies that are the same size as the rectangle. I like to anchor all of my objects to CGPointZero, however I\'ve noticed when

7条回答
  •  执念已碎
    2020-12-09 15:21

    Use default anchor point and it should solve your problem. I had the same problem and I had to programmatically set anchor point to x: 0.5 and y: 0.5 for every physics body in scene. This solved my problems.

提交回复
热议问题