Previous: Transform Window, Up: Interaction [Contents][Index]
This component swaps out a prefab based on neighboring rules. It also rotates the object so you don’t need a prefab for each direction. Great for dungeon crawlers, or user-created walls. It assumes it’s instantiated in the correct position for the prefab edges to line up correctly.
GameObject
inlineConnectionStraight line wall, across the X axis
GameObject
tIntersectionThe bottom of the T should face down the -z
GameObject
intersection4-way cross section
GameObject
dogLegShould go down the -Z and +X axes
Vector3
raycastOffsetWhere to offset the raycast from origin to check for neighbors
Default value: Vector3.up
float
rayLengthDistance from origin+offset to raycast out for neighbors, goes in cardinal directions
Default value: 2.0f
LayerMask
rayMaskCollision mask for objects that count as walls
GameObject
inlineConnectionStraight line wall, across the X axis
GameObject
tIntersectionThe bottom of the T should face down the -z
GameObject
intersection4-way cross section
GameObject
dogLegShould go down the -Z and +X axes
Vector3
raycastOffsetWhere to offset the raycast from origin to check for neighbors
Default value: Vector3.up
float
rayLengthDistance from origin+offset to raycast out for neighbors, goes in cardinal directions
Default value: 2.0f
LayerMask
rayMaskCollision mask for objects that count as walls
Previous: Transform Window, Up: Interaction [Contents][Index]