< Return to Video

Physic Materials - Unity Official Tutorials

  • 0:00 - 0:02
    Physic Materials are materials that instead
  • 0:02 - 0:04
    of effecting the appearance of a game object
  • 0:04 - 0:06
    they effect the way that the object reacts
  • 0:06 - 0:08
    to the physics engine. Consider the difference
  • 0:08 - 0:11
    between how a basketball and a bowling ball
  • 0:11 - 0:13
    might bounce. Whilst there is a difference
  • 0:13 - 0:15
    in their mass, their surfaces are also
  • 0:15 - 0:17
    very different and they react to other
  • 0:17 - 0:19
    surfaces very differently. Physic materials
  • 0:19 - 0:21
    can be created from the Create button
  • 0:21 - 0:23
    on the project panel.
  • 0:25 - 0:27
    And they're edited in the inspector to
  • 0:27 - 0:29
    control how the surface reacts to another
  • 0:29 - 0:32
    surface. They do this by controlling friction.
  • 0:32 - 0:34
    Dynamic Friction is how much friction
  • 0:34 - 0:36
    exists whilst the object is moving
  • 0:36 - 0:38
    and Static Friction is how much
  • 0:38 - 0:40
    force is required in order to move the
  • 0:40 - 0:42
    object from a static position.
  • 0:42 - 0:44
    Bounciness does exactly what it sounds like.
  • 0:44 - 0:47
    It controls how bouncy the object is.
  • 0:47 - 0:49
    And the Friction Combine settings control
  • 0:49 - 0:52
    how they respond to another object
  • 0:52 - 0:54
    with a certain material. Friction Direction
  • 0:54 - 0:56
    will allow you to control friction
  • 0:56 - 0:59
    in a particular axis and the dynamic
  • 0:59 - 1:01
    and static friction 2 properties
  • 1:01 - 1:04
    will give you control over those three axes.
  • 1:04 - 1:06
    In this example we've applied this
  • 1:06 - 1:09
    particular physic material to our power cube
  • 1:09 - 1:11
    and our work bench.
  • 1:12 - 1:14
    The physic material is applied to the
  • 1:14 - 1:16
    collider in any given game object
  • 1:16 - 1:18
    and you can see that there's a slot for
  • 1:18 - 1:21
    material within the collider settings.
  • 1:23 - 1:25
    You can see that if I press play,
  • 1:25 - 1:28
    it bounces slightly and is also very slippery.
  • 1:29 - 1:31
    This is because I've used 0 for dynamic
  • 1:31 - 1:34
    and static friction, meaning there's nothing
  • 1:34 - 1:36
    stopping it from slipping around and
  • 1:36 - 1:38
    I've also made it slightly bouncy.
  • 1:38 - 1:40
    If I make it very bouncy
  • 1:41 - 1:43
    then it's going to bounce off of the table.
  • 1:45 - 1:47
    And for example if I wanted to restrict
  • 1:47 - 1:49
    it's movement in a particular axis
  • 1:49 - 1:51
    so I can see that the X axis is the direction
  • 1:51 - 1:53
    in which it's sliding, so what I could do
  • 1:53 - 1:55
    is go back to that material and I'll set
  • 1:55 - 1:58
    my friction direction of X to 1 and
  • 1:58 - 2:01
    increase the dynamic friction. I'm going to turn
  • 2:01 - 2:04
    bounciness back down to a lower number
  • 2:04 - 2:06
    so that it doesn't bounce off the table.
  • 2:07 - 2:09
    And you can see that it's slowing to a halt
  • 2:09 - 2:12
    because of the amount of friction involved there.
  • 2:12 - 2:14
    So we could make that slightly lower
  • 2:20 - 2:22
    and you can see it begins to slide.
  • 2:29 - 2:30
    So hopefully you can see that with
  • 2:30 - 2:32
    physic materials you can completely control
  • 2:32 - 2:34
    the surface of an object
  • 2:34 - 2:36
    and how it responds to others.
Title:
Physic Materials - Unity Official Tutorials
Description:

more » « less
Video Language:
English, British
Duration:
02:36

English subtitles

Revisions