🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

quick implementation of different colliders on corner tiles

Started by
2 comments, last by Wyrframe 4 years, 9 months ago

I'm fairly new to creating full 2d levels, so please feel free to correct me if I use incorrect terminology or if I'm doing something wrong here. Currently, I am using the Tile Palette with several sprites placed on it to create my levels. With that I can just run my mouse across the screen and quickly place tiles. Then on the TIlemap gameobject I place a Tilemap Collider and a Composite Collider. This works great, it's quick, simple, and efficient. However, for the next part of my character controller I'm looking at adding the ability to do a ledge grab. After doing some research, it seems like a common way to do that is to make the ledge he can grab "grabable" by putting a different collider on them. So my question is, is there an efficient way to where I can let the Tile Palette know if I use a specific corner sprite, place the ledge grab collider on it? Is there any way other than going through all the ledges in the game and manually placing them there? I'm also open to any tips on level building and using the Tilemap, etc that may help me out as, like I said, I'm pretty new to it all. Thanks!

Advertisement

After doing some more research, I've learned a bit about scriptable tiles, but I'm still a little confused about how exactly this works. If I have a tile palette with top, corner, side, and bottom tiles, could I make just the corner tiles scriptable tiles and then using that script make them have an individual collider of a different layer or tag?

We're missing some important context, here... it sounds like you are using Unity? You should try some Unity-specific forums (either the Middleware subforum here, or another forum).

That said, from what I know of Unity, it sounds like you need to add the "edge grab" colliders to the components of your "specific corner tile" prototype. When that tile is instantiated, it will come along with all its components.

RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.

This topic is closed to new replies.

Advertisement