2D physics world manager class for the scene
场景对应的2D物理管理类
constructor method
构造方法
An internal identifier used to find the manager by Scene3D.
用于通过 Scene3D 查找管理器的内部标识符
静态
2Dphysics manager class name
2D物理管理类类名
Get the box2D world corresponding to the current scene
获取当前场景对应的box2D世界
Get the current gravity value of the physical world
获取当前物理世界的重力值
清除场景中所有的力
Clear all forces in the scene
销毁物理世界。
Destroy the physics world.
是否开启
绘制模式
设置是否开启物理世界的Debug绘制
Set whether to enable the debug drawing of the physics world
刚体的数量.
获取物理世界中刚体的数量.
Get the number of bodies in the physics world.
碰撞的数量.
获取物理世界中碰撞的数量.
Get the number of collisions in the physics world.
关节的数量.
获取物理世界中关节的数量.
Get the number of joints in the physics world.
The pixel ratio of the physics world
获取物理世界像素对照单位
Get the pixel ratio of the physics world
位置迭代次数.
获取物理世界模拟中位置的迭代次数.
Get the number of iterations of the physics world simulation.
场景或根节点
获取物理世界绑定的场景或根节点
Get the physics world bound to the scene or root node
获取物理世界子步迭代次数
Get the number of substeps in the physics world
速度迭代次数
获取物理世界模拟中速度的迭代次数.
Initialization method called during Scene3D initialization.
在 Scene3D 初始化过程中调用的初始化方法
Laya坐标.
Physics2D坐标.
将Laya坐标转换到物理坐标系.
Convert Laya coordinates to physics coordinates.
将物理坐标系转换到Laya坐标.
Convert physics coordinates to Laya coordinates.
返回的ColliderBase数组
要查询的AABB包围盒
查询物理世界中所有可能与提供的AABB重叠的内容
Query the physical world for all possible overlaps with the provided AABB
射线开始位置
射线结束位置
查询物理世界中对射线路径上的所有形状,可以获取最近点、任意点、还是 n 点。射线投射会忽略包含起点的形状。
Query the physical world for all shapes on a ray path, either the closest point, any point, or n points. Ray casting ignores shapes that contain the starting point.
派发物理世界的事件
dispath the events of the physics2d world
重力
设置重力向量
Set the gravity vector
设置像素比例
设置物理世界像素对照单位
Set the pixel ratio of the physics world
位置迭代次数
设置物理世界模拟中位置的迭代次数.
Set the number of iterations of the physics world simulation.
设置物理世界子步迭代次数
Set the number of substeps in the physics world
设置物理世界模拟中速度的迭代次数,迭代次数越多越精确,性能越差.
Set the number of iterations of the physics world simulation, the more iterations, the more accurate, but the more performance.
新的物理世界原点
平移整个物理世界的远点
Shift the far point of the entire physics world
New physics world origin
Update method called every frame in the render loop.
渲染循环中每一帧调用的更新方法
En
2D physics world manager class for the scene
Zh
场景对应的2D物理管理类