找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

查看: 379|回复: 10

[其他] Unity官方翻译: Rigidbody 刚体

[复制链接]

该用户从未签到

16

主题

29

帖子

39

积分

LV.1

Rank: 1

积分
39
QQ
发表于 2016-7-9 21:19:51 | 显示全部楼层 |阅读模式
Rigidbody 刚体ARial, sans-serif">
class in UnityEngine / Inherits from: Component

Description 描述
Control of an object's position through physics simulation.
通过物理模拟控制一个物体的位置。
Adding a Rigidbody component to an object will put its motion under the control of Unity's physics engine. Even without adding any code, a Rigidbody object will be pulled downward by gravity and will react to collisions with incoming objects if the right Collider component is also present.
添加Rigidbody组件到一个对象,这就置于了Unity的物理引擎下使其运动。即使没有添加任何代码,刚体对象也将在重力的影响下下落,如果带有碰撞器的对象与之碰撞,并将做出反应。
The Rigidbody also has a scripting API that lets you apply forces to the object and control it in a physically realistic way. For example, a car's behaviour can be specified in terms of the forces applied by the wheels. Given this information, the physics engine can handle most other aspects of the car's motion, so it will accelerate realistically and respond correctly to collisions.
从脚本添加力到刚体对象上,以真实的物理方法来控制它。例如,轿车的行为可以给轮胎施加力,物理引擎处理运动的其他方面,因此,会有更真实的加速度和正确的碰撞反应。
In a script, the FixedUpdate function is recommended as the place to apply forces and change Rigidbody settings (as opposed to Update, which is used for most other frame update tasks). The reason for this is that physics updates are carried out in measured time steps that don't coincide with the frame update. FixedUpdate is called immediately before each physics update and so any changes made there will be processed directly.
在脚本,FixedUpdate函数中被推荐放置应用力以及修改刚体设置(相对于Update,应用其他大部分更新任务)。物理更新的时间间隔与update是不一致的,在每个物理更新之前,FixedUpdate被立即调用,所以所作的任何更改会直接处理。
A common problem when starting out with Rigidbodies is that the game physics appears to run in “slow motion”. This is actually due to the scale used for your models. The default gravity settings assume that one world unit corresponds to one metre of distance. With non-physical games, it doesn't make much difference if your models are all 100 units long but when using physics, they will be treated as very large objects. If a large scale is used for objects that are supposed to be small, they will appear to fall very slowly - the physics engine thinks they are very large objects falling over very large distances. With this in mind, be sure to keep your objects more or less at their scale in real life (so a car should be about 4 units = 4 metres, for example).
当刚体运行开始常见的问题是,游戏物理引擎看上去运行像“慢镜头”。这实际上由于你模型的大小,默认重力设置假定为每世界单位1米距离。对非物理游戏,你的模型缩放100单位也没有多大差别,但当使用物理引擎,它们将被视为非常大的对象。如果应该是小对象使用较大的缩放,它们将出现下落很慢,物理引擎认为它是非常大的对象,下落较大的距离。考虑到这一点,请确保你的对象接近真实生活的大小(例如,轿车应该是大约4单位=4米)。

Variables 变量
angularDragThe angular drag of the object.
刚体的角阻力。
angularVelocityThe angular velocity vector of the rigidbody.
刚体的角速度向量。
centerOfMassThe center of mass relative to the transform's origin.
相对于变换原点的质心。
collisionDetectionModeThe Rigidbody's collision detection mode.
刚体的碰撞检测模式。
constraintsControls which degrees of freedom are allowed for the simulation of this Rigidbody.
控制该刚体模拟允许的自由度。
detectCollisionsShould collision detection be enabled? (By default always enabled).
碰撞检测应否启用?(默认总是启用的)
dragThe drag of the object.
刚体的阻力。
freezeRotationControls whether physics will change the rotation of the object.
控制物理是否改变物体的旋转。
inertiaTensorThe diagonal inertia tensor of mass relative to the center of mass.
相对于重心的质量的惯性张量对角线。
inertiaTensorRotationThe rotation of the inertia tensor.
惯性张量的旋转。
interpolationInterpolation allows you to smooth out the effect of running physics at a fixed frame rate.
插值允许你以固定的帧率平滑物理运行效果。
isKinematicControls whether physics affects the rigidbody.
控制物理是否够影响这个刚体。
massThe mass of the rigidbody.
刚体的质量。
maxAngularVelocityThe maximimum angular velocity of the rigidbody. (Default 7) range { 0, infinity }.
刚体的最大角速度,(默认7)范围{0, 无穷大}
maxDepenetrationVelocityMaximum velocity of a rigidbody when moving out of penetrating state.
当非穿透状态时,刚体的最大速度。
positionThe position of the rigidbody.
该刚体的位置。
rotationThe rotation of the rigdibody.
刚体的旋转角度。
sleepThresholdThe mass-normalized energy threshold, below which objects start going to sleep.
哪个对象开始进入休眠状态,质量归一化的能量阈值。
solverIterationCountAllows you to override the solver iteration count per rigidbody.
允许你覆盖每个刚体的求解迭代次数。
useConeFrictionForce cone friction to be used for this rigidbody.
用于该刚体的锥形摩擦力。
useGravityControls whether gravity affects this rigidbody.
控制重力是否影响整个刚体。
velocityThe velocity vector of the rigidbody.
刚体的速度向量。
worldCenterOfMassThe center of mass of the rigidbody in world space (Read Only).
在世界坐标空间的刚体的质量中心。(只读)


Public Functions 共有变量
AddExplosionForceApplies a force to a rigidbody that simulates explosion effects.
应用一个力到刚体来模拟爆炸效果。
AddForceAdds a force to the rigidbody.
添加到刚体的力。
AddForceAtPositionApplies force at position. As a result this will apply a torque and force on the object.
在position位置应用force力。作为结果这个将在这个物体上应用一个扭矩和力。
AddRelativeForceAdds a force to the rigidbody relative to its coordinate system.
添加力到刚体。相对于它的系统坐标。
AddRelativeTorqueAdds a torque to the rigidbody relative to its coordinate system.
相对于它的局部坐标系统添加扭矩到刚体。
AddTorqueAdds a torque to the rigidbody.
添加扭矩到刚体。
ClosestPointOnBoundsThe closest point to the bounding box of the attached colliders.
指定位置到该刚体附加的碰撞器的最近点。
GetPointVelocityThe velocity of the rigidbody at the point worldPoint in global space.
刚体在世界坐标空间,worldPoint点的速度。
GetRelativePointVelocityThe velocity relative to the rigidbody at the point relativePoint.
相对于刚体在relativePoint点的速度。
IsSleepingIs the rigidbody sleeping?
刚体在休眠么?
MovePositionMoves the rigidbody to position.
移动刚体到新位置。
MoveRotationRotates the rigidbody to rotation.
旋转刚体到新角度。
ResetCenterOfMassReset the center of mass of the rigidbody.
重置刚体的质心。
ResetInertiaTensorReset the inertia tensor value and rotation.
重置惯性张量值和旋转。
SetDensitySets the mass based on the attached colliders assuming a constant density.
设置基于附加的碰撞器假设一个固定的密度质量。
SleepForces a rigidbody to sleep at least one frame.
强制刚体休眠。
SweepTestTests if a rigidbody would collide with anything, if it was moved through the scene.
如果一个刚体碰到任何东西触发测试。
SweepTestAllLike Rigidbody.SweepTest, but returns all hits.
就像Rigidbody.SweepTest,当返回的是所有碰撞信息。
WakeUpForces a rigidbody to wake up.
强制一个刚体唤醒。


Messages 消息
OnCollisionEnterOnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider.
当collider/rigidbody接触到另一个rigidbody/collider时,OnCollisionEnter被调用。
OnCollisionExitOnCollisionEnter is called when this collider/rigidbody has stopped touching another rigidbody/collider.
当collider/rigidbody停止接触到另一个rigidbody/collider时,OnCollisionExit被调用。
OnCollisionStayOnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider.
当collider/rigidbody一旦接触另一个rigidbody/collider时,OnCollisionStay每帧被调用。



该用户从未签到

0

主题

9

帖子

0

积分

LV.1

Rank: 1

积分
0
QQ
发表于 2016-7-20 23:40:27 | 显示全部楼层
增强现实希望发展越来越好

该用户从未签到

1

主题

52

帖子

50

积分

LV.2

Rank: 2

积分
50
QQ
发表于 2016-7-21 01:46:05 | 显示全部楼层
嗯,很不错的样子!!

该用户从未签到

1

主题

38

帖子

37

积分

LV.1

Rank: 1

积分
37
发表于 2016-8-28 20:51:11 | 显示全部楼层
想了解下AR增强现实的相关内容来看看

该用户从未签到

1

主题

49

帖子

3

积分

LV.1

Rank: 1

积分
3
QQ
发表于 2016-8-28 21:19:28 | 显示全部楼层
楼主辛苦了。。回帖是一种美德

该用户从未签到

2

主题

10

帖子

14

积分

LV.1

Rank: 1

积分
14
发表于 2016-10-7 03:10:25 | 显示全部楼层
看帖怎么能不会呢??

该用户从未签到

0

主题

7

帖子

0

积分

LV.1

Rank: 1

积分
0
QQ
发表于 2016-10-8 18:30:00 | 显示全部楼层
增强现实,增强现实,增强现实。重要的事情说三遍

该用户从未签到

0

主题

6

帖子

0

积分

LV.1

Rank: 1

积分
0
QQ
发表于 2016-10-11 23:43:17 | 显示全部楼层
这里竟然还有这么一个关于AR的网站的收藏了

该用户从未签到

3

主题

24

帖子

27

积分

LV.1

Rank: 1

积分
27
QQ
发表于 2016-10-15 00:49:28 | 显示全部楼层
竟然还有零回复,给我消失

该用户从未签到

1

主题

15

帖子

17

积分

LV.1

Rank: 1

积分
17
QQ
发表于 2017-2-5 12:42:33 | 显示全部楼层
楼主辛苦了,帮楼主顶起来
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

关闭

站长推荐上一条 /1 下一条

快速回复 返回顶部 返回列表