2D Toolkit Forum

2D Toolkit => Support => Topic started by: AustinFelipe on January 09, 2013, 11:30:02 pm

Title: Easy way to create collison path
Post by: AustinFelipe on January 09, 2013, 11:30:02 pm
I just bought the tk2d and I'm really enjoying working, but I have one question, there is some program, some way to create a collision without having to do it manually? For example, you can analyze pixel by pixel, ignoring alpha pixels and make a map of collision.

I appreciate any response.
Title: Re: Easy way to create collison path
Post by: unikronsoftware on January 10, 2013, 12:51:19 am
There isn't at the moment, but I'll be looking into that in a future update targetting the collision system.
Title: Re: Easy way to create collison path
Post by: AustinFelipe on January 10, 2013, 01:20:00 am
Ok, if I want implement this function at runtime using 2D toolkit, like change the vertices colliders from sprite, what do you recommend?

Thanks for the fast answer...
Title: Re: Easy way to create collison path
Post by: unikronsoftware on January 10, 2013, 01:23:39 am
You shouldn't change collider vertices at runtime, it is really really expensive. If you want to do something similar, I suggest creating multiple box colliders as children and manipulating them. Make sure that your sprite has a rigid body attached though, otherwise this will be expensive (but not anywhere as expensive as the other option) too.