LayerProcGen v0.4.0
Layer-based infinite procedural generation
Loading...
Searching...
No Matches
FloatingOriginSetter

Unity component that can move the FloatingOrigin based on the given transform position. More...

Inherits MonoBehaviour, and IOriginHandler.

Public Member Functions

void HandleOriginShift (Point3 oldOrigin, Point3 newOrigin)
 Implementation of the IOriginHandler interface. Not to be called directly.

Public Attributes

int incrementDist = 1000
 The origin is shifted if the transform position is further than this distance from the current origin (along the cardinal directions in the generation plane).
bool moveSelf
 Whether the component should move its GameObject's transform when the origin shifts. This should be enabled if and only if no other component performs this job.
Point origin
 The current origin as a 2D point in the generation plane.

Detailed Description

Unity component that can move the FloatingOrigin based on the given transform position.

Member Function Documentation

◆ HandleOriginShift()

void HandleOriginShift ( Point3 oldOrigin,
Point3 newOrigin )

Implementation of the IOriginHandler interface. Not to be called directly.

Implements IOriginHandler.