2D Toolkit Forum

2D Toolkit => Support => Topic started by: Square on February 16, 2013, 08:33:43 pm

Title: Collision data without rigidbodies?
Post 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.
Title: Re: Collision data without rigidbodies?
Post by: unikronsoftware on February 16, 2013, 08:37:05 pm
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.
Title: Re: Collision data without rigidbodies?
Post by: Square on February 16, 2013, 08:39:58 pm
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".
Title: Re: Collision data without rigidbodies?
Post by: unikronsoftware on February 16, 2013, 10:08:16 pm
It's not quite automatic as it just uses the unity physics engine. (physx)