Hello Guest

Author Topic: Do Character Controllers Invalidate Other Colliders On tk2d Sprites?  (Read 5464 times)

tyrannosaur_jet

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
I've been messing around with Unity's 2D Gameplay Tutorial http://unity3d.com/support/resources/tutorials/2d-gameplay-tutorial, and one of the first things I noticed is that it seems like the capsule collider that comes with their character controller makes any other colliders stop colliding, including ones that I had set up for each sprite in the tk2d settings. I can't find any documentation from Unity that says as much, and I've even found a couple of threads online where people talk about making this kind of thing work, but no matter what I do, I can't seem to get it to work myself -- if I use a character controller, it seems like I'm limited to their capsule collider, and every collider I've set up in my sprite collections goes totally out the window.

This is even more obnoxious because I'm using Z depth to determine the draw order of my objects, which means that, if those objects use a capsule collider, they change their behaviors slightly the further away their Z is from each other.

Does anyone have any kind of insight on this? Any best practices for mixing tk2d stuff with character controllers, or just making tk2d stuff control like a classic platformed in some other way? I've been tearing my hair out over this. As always, any help would be hugely appreciated!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Do Character Controllers Invalidate Other Colliders On tk2d Sprites?
« Reply #1 on: November 16, 2012, 07:48:35 pm »
If you use the character controller you are limited to the capsule collider. If you want to use any other collider type, you'll have to write your own character controller using rigidbodies. Hint: always addforce, never move it.

tyrannosaur_jet

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Do Character Controllers Invalidate Other Colliders On tk2d Sprites?
« Reply #2 on: November 16, 2012, 08:27:03 pm »
Cool, thanks for the reply! I was afraid of that, but whatcha gonna do.

I'll definitely put it forth that this kind of thing is something I'd LOVE to see in future releases of 2D Toolkit. 2D CharacterControllers that are 100% compatible with all the colliders generated by tk2d Sprite Collections would be an incredible thing to have, and it's a niche that I definitely think needs filling. Hell, I'd even pay extra for an upgrade that added that.

Is that something you'd ever consider adding?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Do Character Controllers Invalidate Other Colliders On tk2d Sprites?
« Reply #3 on: November 16, 2012, 08:37:38 pm »
Maybe.

The thing with 2D Toolkit is, almost every single feature in it has been used in a game/demo we've developed. I wouldn't feel comfortable creating a feature without using it myself on something - really hard to get things right like that.

If anyone else would like something like this then please let me know too - I can build my next project around something like this if necessary.