Skip to main content

CylindricalBoundsSurface

A class in Root.Township, Alta.Chunks.

Spawn surface that finds points by raycasting sideways (outward or inward) inside a cylinder arc around the object. Its settings are saved with the object.

Constructors​

MemberWhat it is
CylindricalBoundsSurface()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private CylindricalBoundsSurfaceSaveData configThe cylinder settings (arc, height, max offset, start and end radius), also used as its save data.

Methods​

MemberWhat it is
override bool GetPosition(out Vector3 position, out Vector3 normal)Tries up to the global retry count of radial raycasts from the start radius toward the end radius and returns the first hit.
void GetRaycast(out Vector3 position, out Vector3 direction)Picks a random start point and direction inside the configured arc, height and side offset, in world space.
override void SetSize(float size)Does nothing for this surface.
1 private and internal method
MemberWhat it is
private void OnDrawGizmosSelected()Empty.