skip to Main Content

How to use the asset in your project

To add a hexasphere to your scene, select “Hexasphere” from the top menu GameObject -> 3D Object -> Hexasphere:

Custom Editor Properties

Hexasphere Settings: this section allows you to configure main grid appearance settings:

Style: wireframe, shaded or both. Note that when Extruded option is enabled, the wireframe styles use an optimized shader that culls hidden lines providing better performance.

Divisions: the hexasphere derives from a basic icosahedrons. This parameter specifies the number of iterations/divisions. The greater this number, more tiles will be created.

Smart Edges: only available when wireframe is visible. When enabled, edges on adjacent tiles with same materials won’t be rendered.

Inverted Mode: renders the hexasphere inwards, placing the camera at its center.

Extruded: enables “extrusion” of tiles which will activate custom geometry shaders and alternate interaction logic to present a 3d view of tiles. Each tile can have a different extrusion amount (form 0 to 1) which can be set using scripting (see scripting section).

  • Multiplier: the height of a tile is determined by the extrusion amount x this global multiplier. You can quickly module the height of all tiles using this parameter.
  • Gradient Intensity: when Extruded, the sides of the tiles will show a gradient color which intensity is controlled by this parameter.
  • Raycast 3D: enable this option to improve tile highlighting or selection. When using Extrude option, tiles will exceed the sphere radius thus the default collider won’t include them. Enabling this option will allow that and produce a more precise selection experience.
  • Wireframe Color: the color of the lines when using the wireframe style.
  • Default Tile Color: this is the default material color for each tile unless you change it using scripting.
  • Tile Tint Color: optiona tintint color applied to all tiles regardless of their assigned colors. Applies to all tiles whereas default tile color only applies to tiles non-colored by user.
  • Use Lighting: this property controls if the hexasphere cast shadows and also is influenced by the directional light in the scene.
  • Tile Texture Size: this is the size of the internal texture array used when assigning textures to individual tiles.
  • Tile Texture Stretch: if true, the uv coordinates of the hexagon vertices will make the texture stretch to the enclosing rectangle. If false, the uv coordinates will match the position of the hexagon vertices as if it’s enclosed in a circle. If you get distortion when applying textures to tiles, try disabling this option.
  • Rotation Shift: allows you to apply an internal rotation to the generated vertices without changing the rotation of the transform. This option can be used to shift the pentagons on other positions.
  • VR Enabled: enabled raycasting compatible with Virtual Reality (see VR section).

Smart Edges option effect:

Smart Edges OFF

Smart Edges ON

Interaction Settings

This section controls the behaviour of the hexasphere grid system.

  • Enable Highlight: activates the tile highlighting when moving the cursor or pointer over the hexasphere grid.
  • Highlight Color & Speed: color and speed for the highlight effect.
  • Enable Rotation: allows the user to rotate the hexasphere using mouse drag.
  • Enable Zoom: allows the user to zoom in/out the hexasphere using mouse wheel (or pinch in/out using touch controls). The min/max values determine the world space distance to the surface of the sphere. Zoom Damping defined the deceleration speed when mouse wheel is released (0 value will stop zoom immediately as the user released the mouse wheel, whereas a value near 1 will produce a deceleration effect until zoom stops).

 PathFinding Settings

This section configures the basic options for the path-finding engine.

  • Estimation Method: the formulae used to compute the estimated distance from a node to the target tile, used by the pathfinding algorithm: spherical distance (uses spherical angle difference between current node and destination tile), Euclidean (uses linear distance between node and destination) and “Euclidean Non SQR” (same than Euclidean but avoid the use of square root which results in a faster algorithm).
  • Search Limit: the maximum number of tiles in the path.
  • Use Extrusion: when enabled, the tile height (0..1) multiplied by Extrusion Weight factor will be added to the crossing cost of that tile.
Back To Top