CharacterLayerManager & LayerMasks

Absent83

Member
Hi Justin!

Can you please describe more detailed CharacterLayerManager?


Enemy Layers
Layer Mask that specifies the layer that the enemies use.

Invisible Layers
Layer Mask that specifies any layers that are invisible to the character (such as water or invisible planes placed on top of stairs).

Solid Layers
Layer mask that specifies any layers that represent a solid object (such as the ground or a moving platform).

An example use is for the collision detection by the character controller. The controller will use the Solid Layers mask to determine what is considered the ground to prevent the character from falling through the floor.



what does it mean that layer is "invisible" / "solid"? How does "enemy" layer use?


how these layers are related to these settings:



 
Last edited:
what does it mean that layer is "invisible"?
There is a collision but the object is invisible. This can be used by the IK system so for example you have an invisible ramp that the character slides on but the IK system doesn't detect that ramp.

How does "enemy" layer use?
By default it's just used by the crosshairs to change colors.

how these layers are related to the settings:
They initialize those fields (well, not the culling mask of the camera), but they aren't used after the component has been added.
 
Top