2d-extras
2d-extras copied to clipboard
5x5 tile check?
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?
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?
Sorry, but...what exactly are you trying to accomplish?
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...

If I want grass to be added to the top of the hills, I need a 5x5 grid here:
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.
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.)
@jmeyer1980 I have the exact same problem now, did you find a good solution?
@frulica Like how exact? Like, trying to automatically add grass tiles above ones you place?
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.
Yes, but why does the slope need a 5x5 check? Could you show me an example of what you want versus what you have?
Imagine a 3x1 slope (3 squares long but only one square high per each step down. Right now, we can only manage 2x2 slopes. Much steeper than what I was wanting to use.
Either way... I gave up on Unity. I couldn’t find a way to do advanced 2d movement by myself without buying something.
Get Outlook for iOShttps://aka.ms/o0ukef
From: Koopa1018 [email protected] Sent: Saturday, February 9, 2019 8:06 PM To: Unity-Technologies/2d-extras Cc: jmeyer1980; Mention Subject: Re: [Unity-Technologies/2d-extras] 5x5 tile check? (#65)
Yes, but why does the slope need a 5x5 check? Could you show me an example of what you want versus what you have?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Unity-Technologies/2d-extras/issues/65#issuecomment-462094287, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAhbPjk5xABnkpH4xu7cwcYCIEoDuAzbks5vL3CwgaJpZM4ZT_IQ.
Yeah...I pretty much don't even bother using rule tiles for slopes. I can't imagine how you would set that up, even if you had a 5x5 grid, so I just manually place slopes and call it a day.
On Sat, Feb 9, 2019 at 11:06 PM jmeyer1980 [email protected] wrote:
Imagine a 3x1 slope (3 squares long but only one square high per each step down. Right now, we can only manage 2x2 slopes. Much steeper than what I was wanting to use.
Either way... I gave up on Unity. I couldn’t find a way to do advanced 2d movement by myself without buying something.
Get Outlook for iOShttps://aka.ms/o0ukef
From: Koopa1018 [email protected] Sent: Saturday, February 9, 2019 8:06 PM To: Unity-Technologies/2d-extras Cc: jmeyer1980; Mention Subject: Re: [Unity-Technologies/2d-extras] 5x5 tile check? (#65)
Yes, but why does the slope need a 5x5 check? Could you show me an example of what you want versus what you have?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/Unity-Technologies/2d-extras/issues/65#issuecomment-462094287>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AAhbPjk5xABnkpH4xu7cwcYCIEoDuAzbks5vL3CwgaJpZM4ZT_IQ
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Unity-Technologies/2d-extras/issues/65#issuecomment-462106864, or mute the thread https://github.com/notifications/unsubscribe-auth/AcmxxyptbFxCdXsBF_SKV6ZITMd3M5YCks5vL7blgaJpZM4ZT_IQ .
This feature is implemented by https://github.com/Unity-Technologies/2d-extras/pull/140
Well then. Don't know how I assumed this would never be added in, but obviously I was mistaken~