Files
Project-M/Assets/_Project/Scripts/Simulation/World/WorldCollisionComponents.cs
T
2026-06-07 22:29:25 -07:00

18 lines
878 B
C#

using Unity.Entities;
namespace ProjectM.Simulation
{
/// <summary>
/// Singleton holding the physics-filter mask of the static world-collision layer ("Environment"): the baked
/// boundary ring + landmark colliders the player CC sweeps. Baked from the GameObject layer at edit-time (see
/// WorldCollisionAuthoring) so server systems can build a <c>CollisionFilter</c> in Burst WITHOUT a managed
/// <c>LayerMask.NameToLayer</c> call or a hardcoded layer index. Read by <see cref="ProjectM.Server"/>'s
/// EnemyAISystem to sweep-test Husk movement against the environment only (never the player / other Husks).
/// </summary>
public struct WorldCollisionConfig : IComponentData
{
/// <summary>BelongsTo bitmask of the Environment physics layer (<c>1u &lt;&lt; layerIndex</c>).</summary>
public uint EnvironmentMask;
}
}