B1 中級 英國腔 3323 分類 收藏
開始影片後,點擊或框選字幕可以立即查詢單字
字庫載入中…
回報字幕錯誤
Let's look at the basic joints in Unity.
In this example we have fixed joints
and spring joints.
This example forms a basic wrecking ball
that does this.
Firstly the fixed joint. Fixed joints
work in a similar way to parenting objects
in the hierarchy.
The joint simply locks a game object
to the point in the world, or to a
connected rigidbody.
In this example we simply have placed the
first capsule in the chain up near
the ceiling and attached a fixed joint.
This locks it in place.
The other parameters of this fixed joint
are Break Force and Break Torque.
This is the minimum amount of force required
to break the joint.
When the joint is broken the game object
can once again move freely.
The other capsules in the chain have
spring joints. Spring joints work on the
principle that the game object is trying
to reach a target position. The target
position that it's trying to reach is the
position that it's set to in the scene view
and any rigid bodies that are attached to it
will pull it away from this position
on an invisible spring attached
to the anchor point.
If the spring joint has a connected rigidbody
then the target point that the spring
is trying to reach is relative to that
game object rather than to world space.
So for example, the second capsule here
is trying to reach capsule 1, and capsule 3
is trying to reach capsule 2.
As these move they will no longer be heading
towards the original positions, rather
they will be heading towards the anchor
point of wherever those capsules happen to be.
The anchor is the pivot point of the joint.
You should consider it as where the spring is
attached to the game object.
This is shown in the scene view by
an orange dot or box.
The spring parameter is a measure of how
strong the spring is. The higher the
value the tighter or stronger the
spring becomes. The damper parameter
is how much the joint will slow down
under motion. The higher the number, the
less the spring will overshoot.
The min and max distances are for setting
up a sort of dead zone for where the
spring isn't active. They effectively restrict
the length of the spring.
Similar to the fixed joint, the spring
also has a break force and a break torque,
which you can set to a certain amount in order
to find the minimum force required to
break that joint.
Finally, Hinge Joints.
Hinge joints are ideal for things like
doors and share some properties with
spring joints. The axis of the hinge
is the one that it rotates around.
In this example our physics door
has the hinge joint attached. The anchor
is set to 1 in the X axis,
which moves it from it's center to it's edge.
Again the joint is represented in
orange in Unity and you can see a small line
showing you where the hinge is currently located.
The axis then allows us to specify
around which axis the hinge will pivot.
We've set this to the Y axis so it will
react like a real hinge with a simple script
we're applying a force to the door
when we click on it, which pushes it
backwards in it's Z axis
using the shortcut minus transform.forward.
In the Add Force lesson you may have seen
that this fires the door straight out of the frame.
But now that we have a hinge,
when we apply the force to the door
it simply pivots around that point.
and no matter how many times we add force
to it, it doesn't break.
In a similar manner to our spring joint
we can apply spring-like characterises
by using the Use Spring checkbox
and using the values underneath the spring settings.
The other differences between hinge joints
and spring joints are motors and limits.
Motors are for introducing a velocity
to your joint, for example a revolving door.
The Target Velocity is the velocity the
joint is trying to rotate at and the
force is used to try and attain that velocity.
If Free Spin is checked then the force will
only be used to try and accelerate
the joint and not to decelerate it.
Limits can be used if you wish to constrain
the motion of your joint, like with the
normal door. The minimum and maximum
are the angles between which the joint
can move. Min and Max Bounce are the amount
by which the joint will bounce when it reaches
one of it's limits. And similar to our
spring joint, yet again we have break
forces and torques.
For example, if we add in a reasonably low
number into the break force property,
we can break the door off of the hinge
when adding a force. You should note that
when doing this the door doesn't fly directly
backwards but is instead pulled away from it's hinge.
提示:點選文章或是影片下面的字幕單字,可以直接快速翻譯喔!

載入中…

关节 unity 官方教程 (Joints - Unity Official Tutorials)

3323 分類 收藏
朱瑛 發佈於 2014 年 5 月 2 日
看更多推薦影片
  1. 1. 單字查詢

    在字幕上選取單字即可即時查詢單字喔!

  2. 2. 單句重複播放

    可重複聽取一句單句,加強聽力!

  3. 3. 使用快速鍵

    使用影片快速鍵,讓學習更有效率!

  4. 4. 關閉語言字幕

    進階版練習可關閉字幕純聽英文哦!

  5. 5. 內嵌播放器

    可以將英文字幕學習播放器內嵌到部落格等地方喔

  6. 6. 展開播放器

    可隱藏右方全文及字典欄位,觀看影片更舒適!

  1. 英文聽力測驗

    挑戰字幕英文聽力測驗!

  1. 點擊展開筆記本讓你看的更舒服

  1. UrbanDictionary 俚語字典整合查詢。一般字典查詢不到你滿意的解譯,不妨使用「俚語字典」,或許會讓你有滿意的答案喔