Properly apply ShowHexTiles for instanced tiles.
parent
39f20c8e01
commit
7627aa3699
|
@ -254,7 +254,14 @@ public class StreamContainer : Spatial
|
||||||
{
|
{
|
||||||
int instanceIndex = _tileToInstanceIndex[tile3D];
|
int instanceIndex = _tileToInstanceIndex[tile3D];
|
||||||
|
|
||||||
Transform instanceTransform = new Transform(tile3D.GlobalTransform.basis.Rotated(Vector3.Up, Mathf.Deg2Rad(30)), tile3D.GlobalTransform.origin + Vector3.Up * -2.5f);
|
Vector3 scale = Vector3.One;
|
||||||
|
if (ShowHexTiles)
|
||||||
|
{
|
||||||
|
scale.x *= 0.96f;
|
||||||
|
scale.z *= 0.96f;
|
||||||
|
}
|
||||||
|
|
||||||
|
Transform instanceTransform = new Transform(tile3D.GlobalTransform.basis.Rotated(Vector3.Up, Mathf.Deg2Rad(30)).Scaled(scale), tile3D.GlobalTransform.origin + Vector3.Up * -2.5f);
|
||||||
|
|
||||||
_tileMultiMesh.Multimesh.SetInstanceTransform(instanceIndex, instanceTransform);
|
_tileMultiMesh.Multimesh.SetInstanceTransform(instanceIndex, instanceTransform);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue