Unity3D圣典3.3版本-中文版
文集大纲加载中……
本文档使用 MrDoc 发布
-
+
首页
Physics 物理学
# Physics 物理学 Global physics properties and helper methods. 全局物理属性和辅助方法。 ### Class Variables**类变量** * [gravity](Physics.gravity.html) The gravity applied to all rigid bodies in the scene. 场景中应用到所有刚性物体的重力。 * [minPenetrationForPenalty](Physics.minPenetrationForPenalty.html) The minimum contact penetration value in order to apply a penalty force (default 0.05). Must be positive. 两个物体接触碰撞时,物体间最小渗透(穿透)深度值。默认 0.05.取值范围从 0 到无穷大。必须是正数。 * [bounceThreshold](Physics.bounceThreshold.html) Two colliding objects with a relative velocity below this will not bounce (default 2). Must be positive. 两个碰撞物体的相对速度如果在这个设定值之下,不会反弹。默认值 2.。取值范围 0 到无穷大。必须为正数。 * [sleepVelocity](Physics.sleepVelocity.html) The default linear velocity, below which objects start going to sleep (default 0.15). Must be positive. 如果物体的线速度在这个速度设定值之下,物体将进入静止状态。默认 0.15。取值范围 0 到无穷大。必须为正数。 * [sleepAngularVelocity](Physics.sleepAngularVelocity.html) The default angular velocity, below which objects start sleeping (default 0.14). Must be positive. 如果物体的角速度在这个速度设定值之下,物体将进入静止状态。默认 0.14。 取值范围 0 到无穷大。必须为正数。 * [maxAngularVelocity](Physics.maxAngularVelocity.html) The default maximimum angular velocity permitted for any rigid bodies (default 7). Must be positive. 物体的最大角速度值。默认是 7。必须为正数。 * [solverIterationCount](Physics.solverIterationCount.html) The default solver iteration count permitted for any rigid bodies (default 7). Must be positive. 默认的求解迭代次数允许使用任意刚体(默认为 7)。必须为正数。 ### Class Functions**类函数** * [Raycast](Physics.Raycast.html) Casts a ray against all colliders in the scene. 在场景中投下可与所有碰撞器碰撞的一条光线。 * [RaycastAll](Physics.RaycastAll.html) Casts a ray through the scene and returns all hits. 投射一条光线并返回所有碰撞。 * [Linecast](Physics.Linecast.html) Returns true if there is any collider intersecting the line between start and end. 从开始位置到结束位置做一个光线投射,如果与碰撞体交互,返回真。 * [OverlapSphere](Physics.OverlapSphere.html) Returns an array with all colliders touching or inside the sphere. 返回球型半径之内(包括半径)的所有碰撞体 [collider](../Collider/Collider.html)[]。 * [CapsuleCast](Physics.CapsuleCast.html) Casts a capsule against all colliders in the scene and returns detailed information on what was hit. 对场景中的碰撞体进行胶囊的投射,如果相交,返回碰撞体的 raycasthit 信息。 * [SphereCast](Physics.SphereCast.html) Casts a sphere against all colliders in the scene and returns detailed information on what was hit. 投射球型物体来判断是否与场景中物体交互,返回 Raycasthit 信息。 * [CapsuleCastAll](Physics.CapsuleCastAll.html) Like Physics.CapsuleCast, but this function will return all hits the capsule sweep intersects. 和 [Physics.CapsuleCast](Physics.CapsuleCast.html) 不同的是这个函数返回所有交互的碰撞体信息。 * [SphereCastAll](Physics.SphereCastAll.html) Like Physics.SphereCast, but this function will return all hits the sphere sweep intersects. 和 [Physics.SphereCast](Physics.SphereCast.html) 不同的是这个函数返回所有交互的碰撞体信息。 * [CheckSphere](Physics.CheckSphere.html) Returns true if there are any colliders touching the sphere defined by position and radius in world coordinates 如果定义的球体和物体发生碰撞,返回真。球体定义在世界坐标系下。 * [CheckCapsule](Physics.CheckCapsule.html) Returns true if there are any colliders touching the capsule defined by the axis going from start and end and having radius in world coordinates 如果定义的胶囊和任意碰撞器发生碰撞,返回真。精灵定义在世界坐标系下。 * [IgnoreCollision](Physics.IgnoreCollision.html) Makes the collision detection system ignore all collisions between collider1 and collider2. 使碰撞体 1 和碰撞体 2 的碰撞侦测无效。 * [IgnoreLayerCollision](Physics.IgnoreLayerCollision.html) Makes the collision detection system ignore all collisions between any collider in layer1 and any collider in layer2. 使碰撞侦测忽略层 1 和层 2 之间的所有碰撞器。 * [GetIgnoreLayerCollision](Physics.GetIgnoreLayerCollision.html) Are collisions between layer1 and layer2 being ignored? 是否层 1 和层 2 之间的碰撞检测被忽略?
da
2022年5月23日 14:16
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码