This is the 21st day of my participation in the August More Text Challenge

concept

The Collider component defines the shape of the object for use in physical collisions. Colliders are invisible, their shape does not have to be exactly the same as the mesh of the object, and in fact, rough approximations are often more effective and hard to detect while the game is running.

Colliders are a class of physical components. 3D and 2D physical components have a unique collider component that must be added to the gameobject along with the rigidbody to trigger a collision. If two rigid bodies bump into each other, the physics engine will not calculate the collision until the two objects have colliding bodies. In the physics simulation, the bodies without colliding bodies will pass through each other.


Common collider properties are introduced

This is a Box Collider

Box collider is a basic collider shaped like a cube, which can be adjusted into cuboids of different sizes, and can be used as doors, walls, platforms and other panel properties as follows:

  • Edit Collider: Visually Edit a Collider by selecting the green collision line visible in the Scene view
  • Is Trigger: Trigger. If checked, the collider can be used to Trigger events and will be ignored by the physics engine
  • Material: Physical Material
  • Center: The position of the collider in the local coordinates of the object
  • Size: the Size of the collider in the X, Y, and Z directions

2, A Sphere Collider

Spherical collider is a basic collider based on sphere. The three-dimensional size of spherical collider can be adjusted uniformly and equally, but the size of some coordinate axis can not be adjusted separately.

  • Radius: Radius, the size of the spherical collider
  • The other properties are the same as Box Collider

E.g. < 1 > My capsules are Collider

,Capsule colliderIt consists of a cylinder with two hemispheres attached to it, and is a basic collider in the shape of a capsule. The radius and height of the capsule collider can be adjusted independently and can be used in character controllers or in combination with other irregularly shaped colliders

  • This item controls the Height of the cylinder in the collider
  • Direction: the axis corresponding to the capsule’s longitudinal Direction in the local coordinates of the object. The default is the Y-axis
  • The other properties are the same as Box Collider

Mesh Collider: A Mesh Collider

By taking grid objects and building collisions on them, grid colliders are more elaborate than basic collisions used on complex grid models, but occupy more system resources

  • Smooth Sphere Collisions: Indicates that Collisions become Smooth after this parameter is selected
  • Mesh: A Mesh that takes the Mesh of the gameobject and uses it as a collider
  • “Convex” : tick this item to “Convex”, and the mesh collider will collide with other mesh colliders
  • A special type of Wheel Collider for ground vehicles with built-in collision detection, Wheel physics, and a reference for slippery tire friction
  • Suspension Distance: Suspension Distance. This item is used to set the maximum elongation Distance of the Suspension of the wheel collision body. According to the local coordinates, the Suspension always extends downward through the Y axis of its local coordinates
  • Center: Center. This item sets the Center of the wheel collider in the local coordinates of the object
  • Suspension Spring: Suspension Spring, which is used to set the wheel collision body by adding Spring and damping external force to make the Suspension reach the target position
  • Forward Friction: The property of Friction when a tire rolls Forward
  • Sideways Friction: The attribute of Friction when a tire rolls Sideways

5. Character Controller Character Controller

Character controllers. Character controllers are primarily used to control the main character in third person or first person games and do not use rigid-body physics

  • Slope Limit: indicates the Slope Limit. This parameter is used to set the Slope that the controlled character can climb only when the Slope is smaller than or equal to this value
  • Step Offset: Step height. This parameter is used to set the height of the highest Step that the controlled character object can ascend
  • Skin Width: the thickness of the Skin. This parameter determines how deep the two colliders can penetrate into each other. A larger parameter will cause jitter, while a smaller parameter will cause the game object under control to get stuck
  • Min Move Distance: Minimum movement Distance. If the movement Distance of the controlled character object is less than this value, the game object will not Move
  • Center: Center, this parameter determines the location of the capsule collider in the world coordinates,
  • Radius: the length Radius of the capsule collider,
  • Height: This parameter sets the Height of the capsule collider of the controlled character object