Skip to main content

PopulationRaycast

A class in Root.Township, Alta.Populations.

Asset with raycast settings for placing population spawns on the ground. RadialPopulationArea uses it.

Constructors​

MemberWhat it is
PopulationRaycast()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

5 private and internal fields
MemberWhat it is
private LayerMask groundLayersLayers that count as ground.
private float maxAcceptableAngleDotMinimum up component of the hit normal; -1 turns the slope check off.
private float minimumRaycastDistanceHits closer than this to the ray start are rejected (default 9).
private float raycastFinishHeightHeight where the ray ends (default -5).
private float raycastStartHeightHeight the ray starts from (default 10).

Methods​

MemberWhat it is
PointNormal? Try(Vector3 position, Vector3 direction)Raycasts for ground and returns the hit point and normal if far enough and flat enough. As decompiled, the ray start ignores position.

Used in​

Members of other types that take, return or hold a PopulationRaycast: