有没有人知道改变Famo.us平台墙的大小的方法? 我已经找到了属性,距离,找到了墙,但很难找到尺寸问题。
答案 0 :(得分:0)
墙对象没有尺寸属性。来自源文档。 Wall描述了一个无限的2D平面。
* A wall describes an infinite two-dimensional plane that physics bodies
* can collide with. To define a wall, you must give it a distance (from
* the center of the physics engine's origin, and a normal defining the plane
* of the wall.
*
* (wall)
* |
* | (normal) (origin)
* | ---> *
* |
* | (distance)
* ...................
* (100px)
*
* e.g., Wall({normal : [1,0,0], distance : 100})
* would be a wall 100 pixels to the left, whose normal points right
你想要的是一个矩形碰撞,目前不支持。您将不得不等待将来的版本或自己编写。