mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Fix tile indexing
This commit is contained in:
parent
c4c5177908
commit
1dddb97ca9
Binary file not shown.
@ -212,10 +212,9 @@ namespace ConformalDecals.MaterialModifiers {
|
||||
|
||||
public void UpdateTile(int index, Vector2 tileSize) {
|
||||
int tileCountX = (int) (_mainTexture.Width / tileSize.x);
|
||||
int tileCountY = (int) (_mainTexture.Height / tileSize.y);
|
||||
|
||||
int x = index % tileCountX;
|
||||
int y = index / tileCountY;
|
||||
int y = index / tileCountX;
|
||||
|
||||
var tile = new Rect(x * tileSize.x, y * tileSize.y, tileSize.x, tileSize.y);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user