UnityAPI手册-2019.4官网版
文集大纲加载中……
本文档使用 MrDoc 发布
-
+
首页
Physics
# Physics class in UnityEngine ## 描述 全局物理属性和 Helper 方法。 ## 静态变量 | [AllLayers](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.AllLayers.html) | 用于选择所有层的层遮罩常量。 | | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | | [autoSimulation](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-autoSimulation.html) | 设置是否应该自动模拟物理。 | | [autoSyncTransforms](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-autoSyncTransforms.html) | 当 Transform 组件发生更改时,是否自动将变换更改与物理系统同步。 | | [bounceThreshold](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-bounceThreshold.html) | 两个相对速度低于该值的对象碰撞后将不反弹(默认为 2)。必须为正值。 | | [clothGravity](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-clothGravity.html) | 布料重力设置。 设置所有 Cloth 组件的重力。 | | [defaultContactOffset](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-defaultContactOffset.html) | 新创建的碰撞体的默认接触偏移。 | | [defaultMaxAngularSpeed](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-defaultMaxAngularSpeed.html) | 动态刚体的默认最大角速率,以弧度为单位(默认为 50)。 | | [defaultPhysicsScene](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-defaultPhysicsScene.html) | Unity 启动时自动创建的 PhysicsScene。 | | [DefaultRaycastLayers](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.DefaultRaycastLayers.html) | 用于选择默认射线投射层的层遮罩常量。 | | [defaultSolverIterations](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-defaultSolverIterations.html) | defaultSolverIterations 确定刚体关节与碰撞接触点的解析精确度(默认为 6)。必须为正值。 | | [defaultSolverVelocityIterations](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-defaultSolverVelocityIterations.html) | defaultSolverVelocityIterations 影响刚体关节与碰撞接触点的解析精确度(默认为 1)。必须为正值。 | | [gravity](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-gravity.html) | 应用于场景中所有刚体的重力。 | | [IgnoreRaycastLayer](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.IgnoreRaycastLayer.html) | 用于选择忽略射线投射层的层遮罩常量。 | | [interCollisionDistance](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-interCollisionDistance.html) | 设置布料相互碰撞的最小间隔距离。 | | [interCollisionStiffness](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-interCollisionStiffness.html) | 设置布料相互碰撞的刚度。 | | [queriesHitBackfaces](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-queriesHitBackfaces.html) | 物理查询是否应该击中背面三角形。 | | [queriesHitTriggers](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-queriesHitTriggers.html) | 指定默认情况下查询(射线投射、球形投射、重叠测试等)是否命中触发器。 | | [reuseCollisionCallbacks](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-reuseCollisionCallbacks.html) | 确定垃圾回收器是否应仅对所有冲突回调重用一个碰撞类型的实例。 | | [sleepThreshold](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics-sleepThreshold.html) | 经过质量标准化的能量阈值 - 当低于该阈值时,对象开始进入睡眠状态。 | ## 静态函数 | [BakeMesh](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.BakeMesh.html) | 准备要与 MeshCollider 配合使用的网格。 | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | [BoxCast](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.BoxCast.html) | 沿射线投射盒体并返回有关命中对象的详细信息。 | | [BoxCastAll](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.BoxCastAll.html) | 与 Physics.BoxCast 类似,但返回所有命中对象。 | | [BoxCastNonAlloc](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.BoxCastNonAlloc.html) | 沿该方向投射盒体,并将命中对象存储在提供的缓冲区中。 | | [CapsuleCast](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.CapsuleCast.html) | 向场景中的所有碰撞体投射胶囊体,并返回有关命中对象的详细信息。 | | [CapsuleCastAll](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.CapsuleCastAll.html) | 与 Physics.CapsuleCast 类似,但该函数将返回胶囊体扫描相交的所有命中对象。 | | [CapsuleCastNonAlloc](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.CapsuleCastNonAlloc.html) | 向场景中的所有碰撞体投射胶囊体,并在缓冲区中返回有关命中对象的详细信息。 | | [CheckBox](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.CheckBox.html) | 检查给定的盒体是否与其他碰撞体重叠。 | | [CheckCapsule](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.CheckCapsule.html) | 检查是否有任何碰撞体与世界空间中的胶囊形体积重叠。 | | [CheckSphere](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.CheckSphere.html) | 如果有任何碰撞体与世界坐标系中由 position 和 radius 界定的球体重叠,则返回 true。 | | [ClosestPoint](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.ClosestPoint.html) | 返回给定碰撞体上最接近指定位置的点。 | | [ComputePenetration](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.ComputePenetration.html) | 计算在指定姿势下将给定碰撞体分开所需的最小平移。 | | [GetIgnoreCollision](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.GetIgnoreCollision.html) | 检查碰撞检测系统是否忽略 collider1 与 collider2 之间的所有碰撞/触发器。 | | [GetIgnoreLayerCollision](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.GetIgnoreLayerCollision.html) | 是否忽略 layer1 与 layer2 之间的碰撞? | | [IgnoreCollision](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.IgnoreCollision.html) | 使碰撞检测系统忽略 collider1 与 collider2 之间的所有碰撞。 | | [IgnoreLayerCollision](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.IgnoreLayerCollision.html) | 使碰撞检测系统忽略 layer1 中的任何碰撞体与 layer2 中的任何碰撞体之间的所有碰撞。注意,IgnoreLayerCollision 将重置受影响的碰撞体的触发器状态,因此,您可能会收到调用该函数导致的 OnTriggerExit 和 OnTriggerEnter 消息。 | | [Linecast](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.Linecast.html) | 如果有任何碰撞体与 start 和 end 之间的线相交,则返回 true。 | | [OverlapBox](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.OverlapBox.html) | 查找与给定盒体接触或位于盒体内部的所有碰撞体。 | | [OverlapBoxNonAlloc](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.OverlapBoxNonAlloc.html) | 查找与给定盒体接触或位于盒体内部的所有碰撞体,并将它们存储到缓冲区中。 | | [OverlapCapsule](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.OverlapCapsule.html) | 在物理世界中检查给定胶囊体,并返回所有重叠的碰撞体。 | | [OverlapCapsuleNonAlloc](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.OverlapCapsuleNonAlloc.html) | 在物理世界中检查给定胶囊体,并在用户提供的缓冲区中返回所有重叠的碰撞体。 | | [OverlapSphere](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.OverlapSphere.html) | 计算并存储接触球体或位于球体内部的碰撞体。 | | [OverlapSphereNonAlloc](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.OverlapSphereNonAlloc.html) | 计算与球体接触或位于球体内部的碰撞体,并将它们存储到提供的缓冲区中。 | | [Raycast](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.Raycast.html) | 向场景中的所有碰撞体投射一条射线,该射线起点为 /origin/,朝向 /direction/,长度为 /maxDistance/。 | | [RaycastAll](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.RaycastAll.html) | 向场景中投射射线并返回所有命中对象。注意,这些结果的顺序未定义。 | | [RaycastNonAlloc](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.RaycastNonAlloc.html) | 向场景中投射射线,并将命中对象存储到缓冲区中。 | | [RebuildBroadphaseRegions](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.RebuildBroadphaseRegions.html) | 重新构建粗筛阶段涉及的区域并设置世界边界。 | | [Simulate](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.Simulate.html) | 在场景中进行物理模拟。 | | [SphereCast](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.SphereCast.html) | 沿射线投射球体并返回有关命中对象的详细信息。 | | [SphereCastAll](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.SphereCastAll.html) | 与 Physics.SphereCast 类似,但该函数将返回球体扫描相交的所有命中对象。 | | [SphereCastNonAlloc](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.SphereCastNonAlloc.html) | 沿该方向投射球体,并将结果存储到缓冲区中。 | | [SyncTransforms](https://docs.unity3d.com/cn/2019.4/ScriptReference/Physics.SyncTransforms.html) | 将 Transform 更改应用于物理引擎。 |
da
2022年6月14日 15:45
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码