The Surface Type Scriptable Object is the main surface concept. Surfaces will trigger effects in response to projectiles, abilities, footsteps, and potentially many other things. Every surface has a list of Impact Effects that bind a Surface Impact to a particular Surface Effect. There should be an element representing each type of collision effect response that you want to cover.

Impact Effects

The Impact Effects array lists all of the Surface Impacts that are used by this Surface Type. Any Surface Impact which should trigger a Surface Effect should be listed here. Elements can be added or removed to the array by increasing or decreasing the size value. Remember that the last element(s) will be removed if you decrease the size value.

Surface Impact and Surface Effect

Whenever an impact occurs the Surface Manager looks for a particular Surface Type and Surface Impact which match. If the Surface Manager cannot find a Surface Type and Surface Impact that match then the Surface Manager will try to come up with a good fallback. The resulting Surface Effect is then triggered.

Creating a new Surface Type

A new Surface Impact can be created from the Assets -> Create -> Ultimate Character Controller -> Surface Type menu option. This menu is also available when you right click within the project view. However, you may find it easier to just duplicate an existing type.

Fallback Surface Type

When the Impact Type is unknown a fallback Surface Type can be used. This is set within the Surface Manager under the Fallback foldout.

Recommended Usage

It is recommended that most of your scene prefabs have a Surface Identifier component with the Surface Type assigned to them. This is the most performant way for the Ultimate Character Controller to look up a surface. When a Surface Effect needs to be played the Ultimate Character Controller will have the Surface Type instantly if it has been added to a Surface Identifier. This prevents the Surface Manager from having to search for a Surface Effect that is the best match.