朱峰社區(qū)首頁 朱峰社區(qū)

搜索資源 注冊|登陸

等待

返回 展開菜單
按功能 按軟件

Unity3D游戲制作教程

Unity3D游戲制作教程

包含5節(jié)視頻教程

本系列包含Unity3D介紹、Unity3D導出人物、Unity3D導出場景、Unity3D導出動作、游戲測試最終完成一個簡單的游戲。是一套非常完整的Unity3D游戲制作教程。

關閉

Unity組件:Hinge Joint 鉸鏈關節(jié)

關注:2119 留言:0 樓主:芝麻粒 發(fā)帖時間:15年11月16日

芝麻粒

普通會員

芝麻粒

社區(qū)新人:1級

關注2227人

  • 性別

  • 年齡

    18

  • 積分

    1

  • 登陸

    1

  • 發(fā)帖

    1

間隔線

The Hinge Joint groups together two Rigidbodies, constraining them to move like they are connected by a hinge. It is perfect for doors, but can also be used to model chains, pendulums, etc.

鉸鏈關節(jié)由兩個剛體組成,約束它們像連在一個鉸鏈上一樣運動,適用于門,不過對于典型的鏈子、鐘擺等同樣適用。

The Hinge Joint Inspector 鉸鏈關節(jié)檢視面板
The Hinge Joint Inspector 鉸鏈關節(jié)檢視面板

Properties 屬性
  • Connected Body 連接體
    Optional reference to the Rigidbody that the joint is dependent upon. If not set, the joint connects to the world.
    為剛體指定的關節(jié)連接物,如不設定,則與世界相連
  • Anchor 錨點
    The position of the axis around which the body swings. The position is defined in local space.
    主體搖擺圍繞的錨點坐標,基于本地坐標系
  • Axis 坐標軸
    The direction of the axis around which the body swings. The direction is defined in local space.
    搖擺方向的坐標,基于本地坐標系
  • Use Spring 是否使用彈簧
    Spring makes the Rigidbody reach for a specific angle compared to its connected body.
    彈簧使剛體相對它連接的主體達到一個特定的角度
  • Spring 彈簧
    Properties of the Spring that are used if?Use Spring?is enabled.
    用于如激活Use Spring的彈簧屬性
  •     Spring 彈簧力
    The force the object asserts to move into the position.
    維持對象移動到一定位置的力
  •     Damper 阻尼
    The higher this value, the more the object will slow down.
    值越大,對象移動越慢
  •     Target Position 目標角度
    Target angle of the spring. The spring pulls towards this angle measured in degrees.
    彈簧的目標角度。彈簧拉向這個角度,以角為單位
  • Use Motor 是否使用馬達
    The motor makes the object spin around.
    Motor使對象旋轉
  • Motor 馬達
    Properties of the Motor that are used if?Use Motor?is enabled.
    用于如激活Use Motor的馬達屬性
  •     Target Velocity 目標速率
    The speed the object tries to attain. 對象設法達到的速度
  •     Force
    The force applied in order to attain the speed. 用于達到目標速率的力
  •     Free Spin 自由轉動
    If enabled, the motor is never used to brake the spinning, only accelerate it.
    如果啟用,Motor永遠不會破壞旋轉,只會加速
  • Use Limits 是否有限制
    If enabled, the angle of the hinge will be restricted within the?Min?&?Max?values.
    如果啟用,鉸鏈的角度將被限制在最大和最小之間
  • Limits 限制
    Properties of the Limits that are used if?Use Limits?is enabled.
    用于如啟用Use Limits?的邊界屬性
  •     Min 最小
    The lowest angle the rotation can go. rotation能達到的最小角度
  •     Max 最大
    The highest angle the rotation can go. rotation能達到的最大角度
  •     Min Bounce 最小彈跳
    How much the object bounces when it hits the minimum stop.
    物體碰觸最小限制時的彈跳值
  •     Max Bounce 最大彈跳
    How much the object bounces when it hits the maximum stop.
    物體碰觸最大限制時的彈跳值
  • Break Force 破壞力
    The force that needs to be applied for this joint to break.
    允許這個鉸鏈破損的力
  • Break Torque 破壞扭矩
    The torque that needs to be applied for this joint to break.
    允許這個鉸鏈破損的扭矩
Details 細節(jié)

A single Hinge Joint should be applied to a GameObject. The hinge will rotate at the point specified by the Anchor property, moving around the specified Axis property. You do not need to assign a GameObject to the joint's Connected Body property. You should only assign a GameObject to the Connected Body property if you want the joint's Transform to be dependent on the attached object's Transform.

單獨的鉸鏈關節(jié)要連在游戲對象上。鉸鏈會繞著Anchor?屬性指定的點,沿著?指定的Axis?屬性方向移動。不需要給關節(jié)的Connected Body?屬性分配游戲對象。只有希望關節(jié)的Transform依賴附加對象的Transform時,才需要分配游戲對象給Connected Body屬性。

Think about how the hinge of a door works. The Axis in this case is up, positive along the Y axis. The Anchor is placed somewhere at the intersection between door and wall. You would not need to assign the wall to the Connected Body, because the joint will be connected to the world by default.

想一想門的鉸鏈如何工作。Axis在這種情況下是向上的,沿Y軸正向。Anchor在門和墻交點的某處。不需要指定墻給Connected Body,因為關節(jié)默認會和世界相連。

Now think about a doggy door hinge. The doggy door's Axis would be sideways, positive along the relative X axis. The main door should be assigned as the Connected Body, so the doggy door's hinge is dependent on the main door's Rigidbody.

現(xiàn)在再想想狗門鉸鏈。狗門的Axis?應該是側向的,沿著X軸的正向。正門應該指定為Connected Body,這樣狗門的鉸鏈即依賴于正門的Rigidbody。

Chains 鏈條

Multiple Hinge Joints can also be strung together to create a chain. Add a joint to each link in the chain, and attach the next link as the Connected Body.

多個鉸鏈關節(jié)也可以串起來變成一條鏈條。給鏈條的每一環(huán)添加一個關節(jié),并附加下一環(huán)為其Connected Body。

Hints 提示
  • You do not need to assign a Connected Body to your joint for it to work.
    不需要指派Connected Body?來使關節(jié)運轉。
  • Use Break Force in order to make dynamic damage systems. This is really cool as it allows the player to break a door off its hinge by blasting it with a rocket launcher or running into it with a car.
    用Break Force來制作動態(tài)破壞的系統(tǒng)。這確實很酷,可以讓玩家用火箭發(fā)射器爆破或者用疾駛的汽車撞,來把門從鉸鏈處弄碎。
  • The Spring, Motor, and Limits properties allow you to fine-tune your joint's behaviors.
    調整Spring、Motor和Limits屬性可以改變關節(jié)的作用。

贊0 踩0

未知用戶

2005-2025 朱峰社區(qū) 版權所有 遼ICP備2021001865號-1
2005-2025 ZhuFeng Community All Rights Reserved

VIP

朱峰社區(qū)微信公眾號

回頂部

1.復制文本發(fā)給您的QQ好友或群、微信等;好友點擊鏈接以后,轉發(fā)就成功了。 2.如朋友點擊您的鏈接,您需要需刷新一下才行;同一個好友僅能點擊一次。
購買VIP,觀看所有收費教程!