
The TextureCharacterControllerModifier component reacts to character controllers that collide with mesh colliders in its children hiearchy. It starts by finding what the contact triangle and point on the mesh collider a character controller hit was. That point is mapped to what part of a texture the character controller hit. Finally, the texture data in Texture
is used to determine what the value should be used for Modifying the character controller that hit that mesh collider.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. |
Parameter
|
CharacterControllerParameter | The parameter of the contacting character controller to modify. |
ModificationMode
|
Mode | How to modify the parameter on the contacting character controller. |
MinValue
|
Float | When the mapped value on Texture maps to a value of 0, what should the value be for the character controller modification?
|
MaxValue
|
Float | When the mapped value on Texture maps to a value of 100% brightness or 1, what should the value be for the character controller modification?
|
Channel
|
ColorChannel | The channel to use on Texture when getting a value for UV contact points.
|
Texture
|
Texture2D | The texture to use for character controller modification data. |
Usage
Attach to the same slot as a mesh collider for best results. A packed texture of RBGA can be used and reused for this component to save on resources and modify 4 different values on 4 different instances of this component to allow for Modifying 4 different character controller properties at the same time.
Examples
Can be used as the character physics equivalent of a color splat map material to allow different terrain like sand or gravel to affect user speed or jump height when walking on it. This can also be used to make a golf course, where the simulated ball can be affected by sand pits or goo.
See Also
- Color Splat Materials to create terrain that acts as the visuals for the physical effects of this component.