2D Toolkit Forum

2D Toolkit => Support => Topic started by: tortelini66 on May 03, 2013, 09:14:08 pm

Title: sprite collider not working
Post by: tortelini66 on May 03, 2013, 09:14:08 pm
Hey Guys,
I ran into antother problem with the 2dtoolkit although I think I just forgot something really simple I'm not able to find myself a solution.
I got a few sprites in a scene, some are animated, and some are not (but thats not important, because the problem is always there, animated or not), and they have polygon colliders on it. And if I ad a rigidbody to one of them, I expect it to collide with the the other sprites, when it fell down. But it didnt. The sprite just fell down, through the other sprite. The z Position should be the same.

Hope you can help me again.
Regards,
Tobi
Title: Re: sprite collider not working
Post by: unikronsoftware on May 03, 2013, 10:57:34 pm
2 mesh colliders cant collide in Unity unless one of them is tagged convex. Is that what is happening?
Title: Re: sprite collider not working
Post by: tortelini66 on May 03, 2013, 11:03:06 pm
I did not knew that, but its not the solution, even if I tag one of them convex, my sprite just fell through it.
Title: Re: sprite collider not working
Post by: unikronsoftware on May 03, 2013, 11:09:20 pm
Are the sprites too small? Does a normal unity box collide with these? Does the sprite collider with a Unity box?
Title: Re: sprite collider not working
Post by: tortelini66 on May 04, 2013, 12:14:41 pm
It did not work until I restarted Unity O.o, everything works with Unity Box Colliders, or the generated ones from 2Dtoolkit, and when I make my Sprite Convex it works too, BUT the convex option unticks itself when I start the game. Its only activated when I start the game ,then pause it, and then tick the convex option. So why is it disabling itself?
Title: Re: sprite collider not working
Post by: unikronsoftware on May 04, 2013, 12:57:30 pm
Tick convex in the sprite collection editor. it overrides the setting in the game view.
Title: Re: sprite collider not working
Post by: tortelini66 on May 04, 2013, 04:15:48 pm
I could hav guessed that. Seems like I have to learn a lot about this plugin. Anyways, that helped, thanks alot.