Hello Guest

Author Topic: CharacterController in a top-down 2D game?  (Read 5022 times)

Seirie

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
CharacterController in a top-down 2D game?
« 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!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: CharacterController in a top-down 2D game?
« Reply #1 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.

Seirie

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: CharacterController in a top-down 2D game?
« Reply #2 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!

Saputo

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: CharacterController in a top-down 2D game?
« Reply #3 on: February 13, 2013, 05:18:01 pm »
Any luck iv had the same problem