Ladders Unity and #30daydev

Making a lot of small games, and only thinking about making it work and not on optimization and correct structures, have made a lot of old problems vanish. πŸ™‚ For instance, months back I spend days on a small problem with a character and detecting when he was on a ladder, it ended with me shelving the project.. It should have been soooo simple, but my character was made up of 3 colliders, and they where animated, so using OnTriggerEnter2d didn’t work as I got an “enter” on one collider and another “enter” for the next and so on, and the same when one collider would “exit” the ladder collider. But now doing other small projects and optimization isn’t in focus, I wanted to revisit it, and as clear as it should have been back months ago, the solution was clear. πŸ™‚ Just make a child GameObject add a small collider on a layer that only interacts with ladders and a small script detection OnTriggerEnter/Exit2d and send the information to the parent script. I haven’t tested it yet, but can’t see why it shouldn’t work πŸ™‚

The #30daydev have already given me so much, and I’m only halfway there. πŸ™‚ I’ll keep learning..

Now, go make games! πŸ˜‰

– Henning

Leave a Reply

Your email address will not be published. Required fields are marked *