Skip to main content

DirectionalBoundsSurface

A class in Root.Township, Alta.Chunks.

Spawn surface that finds points by raycasting straight down (in local space) from random spots on the top of a box. Its extents are saved with the object.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private Vector3 extentsHalf-size of the box the raycasts are made in.

Methods​

MemberWhat it is
override bool GetPosition(out Vector3 position, out Vector3 normal)Tries up to the global retry count of downward raycasts across the box height and returns the first hit.
override void SetSize(float size)Sets all three extents to the given size.
1 private and internal method
MemberWhat it is
private void OnDrawGizmosSelected()Draws the box in the scene view.