2D Toolkit Forum

2D Toolkit => Support => Topic started by: Seirie on February 09, 2013, 07:52:45 pm

Title: CharacterController in a top-down 2D game?
Post by: Seirie on February 09, 2013, 07:52:45 pm
Hey there! This isn't exactly a 2D Toolkit question, but I am using the polygon mesh colliders that the sprite collection tool generates.

In our game, we use hand-painted backgrounds for our levels instead of tiles. The walls/edges of our levels are often curvy, so we want to outline the background art with polygon mesh colliders and have a CharacterController attached to the main avatar so that it will slide nicely against the walls.

So far, this works perfectly on the x-axis. If you approach a diagonal wall horizontally the avatar will slide appropriately, but vertically, the avatar will stop dead in it's tracks. I'm not sure why this is the case.

Any advice or insight is greatly appreciated. Thanks!
Title: Re: CharacterController in a top-down 2D game?
Post by: unikronsoftware on February 09, 2013, 11:11:10 pm
Just tried this and I can reproduce it, but I'm not sure how to work around this apart from rotating the whole world so it lies on the XZ plane...

Seems to be a pretty arbitrary limit in the character controller.
Title: Re: CharacterController in a top-down 2D game?
Post by: Seirie on February 10, 2013, 04:37:04 am
Yeah, thats what I was afraid of, haha.

Thanks so much for taking the time to look into that unikron!
Title: Re: CharacterController in a top-down 2D game?
Post by: Saputo on February 13, 2013, 05:18:01 pm
Any luck iv had the same problem