This is the 26th day of my participation in the August Text Challenge.More challenges in August

An overview of the

In daily development, we often use to collision characters, sometimes it does not require the precision, add a CapsuleCollider directly on people, just a matter of doing so while convenient but will have a lot of disadvantages, such as when people do actions may arm, where there is no such as collision, or when the character bend, Collisions are also performed in a standing position, which is very bad for the experience. Then it is necessary to add collisions for each node of the character in detail. At this time, some people may make AddComment on each node of the character skeleton. This method is very slow, so this article is mainly about how to quickly add collision

Function implementation

This is also a plugin THAT I found by accident on GitHub. There will be a download address at the bottom. This article mainly explains how to use. The tool for setting Character colliders mainly uses the Humanoid Character to get the Avatar skeleton definition. To add a bump to the bone. Support for Unity’s Normal Collider and Fake LineSphere “Collider”. First let’s look at how to open the Auto Add Bone screen. After importing the plugin into Unity, you’ll see an FTP_Tools option in the menu bar

Click development now has two options

  • FTP – AutoWrapHumanBodyColliders: add collision to characters automatically
  • Ftp-collidertools: Character collision Settings (can only be used after adding a collision)

FTP – AutoWrapHumanBodyColliders

Let’s look at it firstAutoWrapHumanBodyCollidersAuto add collision

Open the interface like this, feel nothing, this is because there is no binding to add collision characterWrap Collider Mode: Adds a Collider Mode.

When we place the character in the Target column, the following screen appears

At this point, let’s clickMapping Bone With Human Avatar, can automatically identify the character skeleton

Mapping Bone With Human AvatarThere is a small check box at the top, which will show the name of each click in the Scene

Next clickAuto Create Collider By SettingIf some of you can’t see this button, make the window bigger, it’s a little bit smaller by default, so this one is under the window. It is my custom to add the collision before adjusting the collision, so that you can see the size and location of the collision in real time. Add collision characters as follows

At this point, we click on the right side to set the location of the collision and other information

  • OverLap: height of collision
  • WidthFactor: the size of the collision (radius)
  • OffsetX: indicates the offset of the x axis
  • OffsetY: indicates the offset of the axis
  • OffsetZ: Indicates the z-axis offset

Specific operations are as follows

Collisions can be added automatically when each parameter is set.

FTP – ColliderTools

Ftp-collidertools can be used to ColliderTools

There are two main functions:

  • Copy Collider: Copy Collider
    1. Source: Collider Source, that is, the collision has been added to the character
    2. Destination: Character to be copied without adding peng collision yet
  • Clear Collider: Clears a collision

These two features are also very good and save us a lot of time.

Source code sharing

GitHub address 1: Click here to jump to download this address includes the project source code and unitypackage package, which can be downloaded without any extra resources, the characters in the Demo are free characters in the official store, you can download by yourself (Adventure Character)

GitHub address 2(original address) : Click here to skip to download

Write in the last

All the shared content is the author used in the daily development process of a variety of small function points, sharing is also a way to review, if there is a bad place to write, please give more advice. Welcome to learn from each other and make progress. This piece article is written here first, hope to be able to help you