2D Toolkit Forum
2D Toolkit => Support => Topic started by: Square on February 16, 2013, 08:33:43 pm
-
I was wondering how currently 2dtoolkit manages collisions without rigidbodies. At least with my present setup, the tilemap accounts for the main character's controller collisions without a rigidbody on either.
But now I'm stuck because my main player character doesn't respond to OnCollision, and I suspect will not collide when testing with OnTrigger.
So do I need to add rigidbodies just to access collision data? A gripe of mine actually is having to add them at all, when collisions seem fine (characters with the tilemap)
Any tips or help are appreciated.
-
You should really have a rigidbody on any moving collider. You don't need a rigidbody on the tilemap, but almost certainly on your player character. Once you create your character / character prefab, add a rigidbody to it.
Or you could use a character controller on the player - it might be easier to do it that way.
-
Yes I do have a character controller on my player.
Ok thanks, I was just interested in how detailed collisions are working in 2dtoolkit I suppose ;)
For now I'll take it as "automagic".
-
It's not quite automatic as it just uses the unity physics engine. (physx)