Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5x5 tile check? #65

Open
jmeyer1980 opened this issue Dec 14, 2018 · 12 comments
Open

5x5 tile check? #65

jmeyer1980 opened this issue Dec 14, 2018 · 12 comments

Comments

@jmeyer1980
Copy link

jmeyer1980 commented Dec 14, 2018

I have a tile set that has gradual slopes that require a 5x5 tile check... but I don't know C# and the changes I have tried in the script have not worked. Can anyone provide me with - or help me make the changes to the script - that would enable a 5x5 check and change the size of the grids in the inspector to 5x5? Or is this already possible and I just don't understand how it is done?

@jmeyer1980
Copy link
Author

After reading some comments on other issues here... i am beginning to think this may not be feasible... so how do I fix my issue? Attaching a clipping of a portion of my tilemap, you can see that the slopes would require more than the 3x3 check... and then there is the grass on top... would two tileset-rules work for this?

tilemap

@Koopa1018
Copy link

Sorry, but...what exactly are you trying to accomplish?

@jmeyer1980
Copy link
Author

jmeyer1980 commented Dec 16, 2018

ok... so in the picture example I provided, the way my current ruleset is, will not work. The best I have been able to manage is this...
image

If I want grass to be added to the top of the hills, I need a 5x5 grid here:

image
so that I can say if there are two tiles below me, but nothing directly above me... then I am a grass tile.
As it stands right now, I have not been able to add grass to the scene without the other tiles changing into something else.

The 5x5 grid would also help smooth out my tilemapcollision... right now, I am having to manually create a collision map after setting the tiles. But, mostly... I am wanting it so that I have the ability to use all of my tiles.

I hope that makes sense.

@Koopa1018
Copy link

Koopa1018 commented Dec 18, 2018

Ohh. Yes, that does make sense.

It seems from your screenshots that each flat grass tile has a specific grass top that always goes with that tile. If that is indeed the case, then you could try merging the two tiles into one sprite with its y origin at 0.25 rather than 0.5--no idea if that's considered "bad practice," but hey, it's a feature that exists (and may or may not be bug-free), and frankly I'm not sure if Unity's Tilemap system has been around long enough to have established "bad practices."

(This is admittedly a proposed solution to your underlying problem and not your stated problem. Even if it does work for you, I really hate it when I find a thread that ends up doing that--so if you or any future readers find that you actually do need a 5x5 grid for some reason, I'm willing to help, although I'm not confident I could actually help with that.)

@frulica
Copy link

frulica commented Feb 3, 2019

@jmeyer1980 I have the exact same problem now, did you find a good solution?

@Koopa1018
Copy link

@frulica Like how exact? Like, trying to automatically add grass tiles above ones you place?

@frulica
Copy link

frulica commented Feb 9, 2019

I mean slopes that need 5x5 check, and also, ground levels that could use 5x5 check as well.
i can fix the ground issue with 2nd tile rule, but the slope issue remains or i have to make it 1 tile slope which just doesn't look as good.

@Koopa1018
Copy link

Yes, but why does the slope need a 5x5 check? Could you show me an example of what you want versus what you have?

@jmeyer1980
Copy link
Author

jmeyer1980 commented Feb 10, 2019 via email

@Koopa1018
Copy link

Koopa1018 commented Feb 11, 2019 via email

@johnsoncodehk
Copy link
Contributor

This feature is implemented by #140

@Koopa1018
Copy link

Well then. Don't know how I assumed this would never be added in, but obviously I was mistaken~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants