排列三:collider 碰撞器

排列三2014079期正版藏机图 www.d0po.cn 2015-1-4 17:07| 发布者: 杨炎| 查看: 1406| 评论: 0|原作者: 蛮牛|来自: unity3d脚本manual

摘要: collider 碰撞器inherits fromcomponenta base class of all colliders.所有碰撞器的基类。参见:boxcollider,spherecollider,capsulecollider,meshcollider,physicmaterial,rigidbody.if you intend to move the col ...

collider 碰撞

inherits fromcomponent

a base class of all colliders.

所有碰撞器的基类。

参见:boxcollider,spherecollider,capsulecollider,meshcollider,physicmaterial,rigidbody.

if you intend to move the collider around a lot it is recommended to also attach a kinematic rigidbody to it.

如果你打算经常移动这个刚体,建议再附加一个运动学刚体给它。

variables变量

enabled

enabled colliders will collide with other colliders, disabled colliders won't.

启用碰撞器将会碰撞其他碰撞器,禁用碰撞器就不会碰撞其他碰撞器。

attachedrigidbody

the rigidbody the collider is attached to.

碰撞器附加的刚体。

istrigger

is the collider a trigger?

碰撞器是一个触发器? (是否可以穿越)

material

the material used by the collider.

撞器使用的材质。

sharedmaterial

the shared physic material of this collider.

碰撞器的共享物理材质。

bounds

the world space bounding volume of the collider.

碰撞器在世界坐标空间的边界框。

functions函数

closestpointonbounds

the closest point to the bounding box of the attached collider.

到附加碰撞器的边界框最近的点。

raycast

casts a ray that ignores all colliders except this one.

投射一个光线(ray),它忽略所有碰撞器,除了这个。

messages sent发送消息

ontriggerenter

ontriggerenter is called when the collider other enters the trigger.

当碰撞器other进入触发器时ontriggerenter被调用。

ontriggerexit

ontriggerexit is called when the collider other has stopped touching the trigger.

当碰撞器other停止触动触发器时,ontriggerexit被调用。

ontriggerstay

ontriggerstay is called almost all the frames for every collider other that is touching the trigger.

每个碰撞器other触动触发器,几乎在所有的帧ontriggerstay被调用。

oncollisionenter

oncollisionenter is called when this collider/rigidbody has begun touching another rigidbody/collider.

当collider/rigidbody开始触动另一个rigidbody/collider时oncollisionenter被调用。

oncollisionexit

oncollisionexit is called when this collider/rigidbody has stopped touching another rigidbody/collider.

当 collider/rigidbody停止触动另一个 rigidbody/collider时,oncollisionexit被调用。

oncollisionstay

oncollisionstay is called once per frame for every collider/rigidbody that is touching rigidbody/collider.

每个collider/rigidbody触动rigidbody/collider,将在每帧调用oncollisionstay。通俗的说,

inherited members继承成员

inherited variables继承变量

transform

thetransformattached to thisgameobject(null if there is none attached).

transform附加到gameobject(游戏物体)(如无附加则为空)。

rigidbody

therigidbodyattached to thisgameobject(null if there is none attached).

rigidbody附加到gameobject(游戏物体)(如无附加则为空)。

camera

thecameraattached to thisgameobject(null if there is none attached).

camera附加到gameobject(游戏物体)(如无附加则为空)。

light

thelightattached to thisgameobject(null if there is none attached).

light附加到gameobject(游戏物体)(如无附加则为空)。

animation

theanimationattached to thisgameobject(null if there is none attached).

animation附加到gameobject(游戏物体)(如无附加则为空)。

constantforce

theconstantforceattached to thisgameobject(null if there is none attached).

constantforce附加到gameobject(游戏物体)(如无附加则为空)。

renderer

therendererattached to thisgameobject(null if there is none attached).

renderer附加到gameobject(游戏物体)(如无附加则为空)。

audio

theaudiosourceattached to thisgameobject(null if there is none attached).

audiosource附加到gameobject(游戏物体)(如无附加则为空)。

guitext

theguitextattached to thisgameobject(null if there is none attached).

guitext附加到gameobject(游戏物体)(如无附加则为空)。

networkview

thenetworkviewattached to thisgameobject(read only). (null if there is none attached)

networkview附加到gameobject(游戏物体)(只读)(如无附加则为空)。

guitexture

theguitextureattached to thisgameobject(read only). (null if there is none attached)

guitexture附加到gameobject(游戏物体)(只读)(如无附加则为空)。

collider

thecolliderattached to thisgameobject(null if there is none attached).

collider附加到gameobject(游戏物体)(如无附加则为空)。

hingejoint

thehingejointattached to thisgameobject(null if there is none attached).

hingejoint附加到gameobject(游戏物体)(如无附加则为空)。

particleemitter

theparticleemitterattached to thisgameobject(null if there is none attached).

particleemitter附加到gameobject(游戏物体)(如无附加则为空)。

gameobject

the game object this component is attached to. a component is always attached to a game object.

组件附加的游戏物体。一个组件总是被附加到一个游戏物体。

tag

the tag of this game object.

游戏物体的标签。

name

the name of the object. //物体的名字

hideflags

should the object be hidden, saved with the scene or modifiable by the user?

物体是否被隐藏、保存在场景中或被用户修改?

相关阅读

文章点评
相关文章
  • 您访问的页面找不回来了 2019-04-07
  • 五莲科技局以“三大”助力动能转换 2019-04-07
  • 匹夫有责之一百一十二—道义大义的博客—强国博客—人民网 2019-03-30
  • 守住青山不放松 护好绿水不辞难——在渝全国人大代表聚焦“共抓大保护、不搞大开发”专题调研记略 2019-03-28
  • 经营者要想“我心换你心”,就要未雨绸缪,让不诚信的诱惑少一点,如此才能在市场中生存下来。反过来说,承担不起亏损就关门歇业,是否也是一种不诚信呢? 2019-03-21
  • 追风上市公司“跌落神坛”-热门标签-华商网数码 2019-03-21
  • 文化艺术交易场所沙龙第一期活动在京顺利举行 2019-03-16
  • 看把你高兴的屁颠屁颠的,光有赞有什么用?我给你个货真价实的 [大红包]。 2019-03-16
  • 候选企业:中国石油呼和浩特石化公司 2019-02-22
  • 我国纳米核心技术取得重大突破 2019-02-22
  • 北京:端午节民俗地图  小枣粽——竹叶红枣糯糯情  2019-01-26
  • 机器人送快递将在西安试点 识别红绿灯还能“车让人” 2019-01-26
  • 首批限竞房正式入市 戳三大盘看详情! ——凤凰网房产北京 2018-12-09
  • 世界杯频爆冷门网友大呼“天台见”!警方:不要冲动,不要跳楼 2018-08-21
  • 始终如一的是:美国优先。 2018-08-21
  • 916| 233| 962| 112| 798| 994| 863| 489| 537| 246|