Hello Guest

Author Topic: Easy way to create collison path  (Read 3991 times)

AustinFelipe

  • Newbie
  • *
  • Posts: 2
    • View Profile
Easy way to create collison path
« 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Easy way to create collison path
« Reply #1 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.

AustinFelipe

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Easy way to create collison path
« Reply #2 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...

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Easy way to create collison path
« Reply #3 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.