Hello Guest

Author Topic: frame custom box colliders bug?  (Read 6791 times)

drkucho

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 72
  • Retro Arcade Freak
    • View Profile
    • Dr. Kucho!
frame custom box colliders bug?
« on: March 02, 2014, 12:06:35 am »
i think i found a bug:

i had my sprite collection with custom box colliders , different size for each frame/sprite etc … it was working good, but i did a lot of changes on my collection , added new sprites, multiple new sprite sheets …

then i found that my game was not changing the shape of the box colliders, well it was , but only on specific frames, weird, i went to the collection messed here and there activate and deactivate them … nothing good happened, in fact then it was not changing any shapes during the game execution , just sticking to the first collider of the first frame (idle position)

after messing a while , i found that , if i change the custom box collider with a polygon collider it works, update shapes on all frames with different polygon colliders etc, i don't even need to click run to see if its gonna work cause i see in the inspector of my sprite that the polygon collider is created or removed when i click commit after adding it or removing it , but …! when it comes to box colliders, this creating/removing thing only happens with i change the sprite ID 16 (the idle position), it does not matter if the rest of sprites have box colliders , or not , if i delete the box collider of spriteID 16 and click commit , the 2DBoxCollider is removed on inspector, if i add it , it is added on inspector, its like the other sprites won't exist …

…I'm going nuts…

on a side: i also want to check the 2dtk version i have and i don't know where to check it

drkucho

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 72
  • Retro Arcade Freak
    • View Profile
    • Dr. Kucho!
Re: frame custom box colliders bug?
« Reply #1 on: March 02, 2014, 12:18:00 am »
some more info : the "Force None" collider setting is also not working, i have the idle frame with a box collider , when i move the character , the run animation starts and i set all those run frames  to "force none" (just for testing) but what happens is the idle box collider shape keeps during all run animation …

drkucho

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 72
  • Retro Arcade Freak
    • View Profile
    • Dr. Kucho!
Re: frame custom box colliders bug?
« Reply #2 on: March 02, 2014, 09:18:26 am »
i found the version on the 2dTool kit unity menu , yes I'm using 2.3.3

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: frame custom box colliders bug?
« Reply #3 on: March 02, 2014, 09:13:23 pm »
If you click on your sprite instances do you by any chance have MORE colliders than you should? I.e. instead of just one collider are there more than one.

drkucho

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 72
  • Retro Arcade Freak
    • View Profile
    • Dr. Kucho!
Re: frame custom box colliders bug?
« Reply #4 on: March 03, 2014, 09:38:32 pm »
the short answer is no , just one collider

the long answer is ….in first there was just a box collider , then testing with polygon colliders on some frames, when i clicked commit tk2d created the polygon collider , but then i removed all colliders myself from the game object, and removed all polygon colliders on the frames of the tk2d sprite collection , only box colliders, and i let tk2d to create it on the game object ...
« Last Edit: March 07, 2014, 09:56:07 am by drkucho »

drkucho

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 72
  • Retro Arcade Freak
    • View Profile
    • Dr. Kucho!
Re: frame custom box colliders bug?
« Reply #5 on: March 07, 2014, 10:03:20 am »
sorry to insist …

i would say that its a bug and because of it the sprite collection data got somehow corrupted and this could be fixed by deleting the asset and creating a new one, as i said it was working before, and right now it does not seem to follow any logic

i would love to avoid rebuilding the collection , that could cause my animations to get messed , and that is the big issue i have a lot of them and most of them with trigger events ...  :'(

TekuStudios

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 177
    • View Profile
    • Teku Studios
Re: frame custom box colliders bug?
« Reply #6 on: March 07, 2014, 05:31:04 pm »
Never experienced something like that. Try creating a new project, throw in the animations that are giving you this headache and try to reproduce your collider setup to see if it also happens in a fresh new project. If it does, then it is quite likely a bug with 2DT, if it doesn't then there's some flaw in your setup.
« Last Edit: March 07, 2014, 05:34:36 pm by TekuStudios »
We are an Indie videogame developer located in Teruel, Spain. A small 6-people team which is currently working on the upcoming 'Candle'.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: frame custom box colliders bug?
« Reply #7 on: March 08, 2014, 01:45:02 pm »
I can't think of any reason this could happen. Try to create a repro case and email it to support - will make it a lot easier to work outs whats going on.

drkucho

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 72
  • Retro Arcade Freak
    • View Profile
    • Dr. Kucho!
Re: frame custom box colliders bug?
« Reply #8 on: March 08, 2014, 09:01:14 pm »
thanks for the ideas, gracias a TekuStudios también ! ;D

right now it's not a big deal cause i decided to handle colliders myself by code for the main character that was the one with the issue, , so now this problem is not delaying my project any more I won't invest more time on it , but frame colliders are such a great thing so I'm sure i will use them in some enemies , if i find more issues or if i find out any answer i will post them here.

2dddd

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: frame custom box colliders bug?
« Reply #9 on: July 18, 2014, 06:50:46 pm »
I had the same problem. I was using custom box colliders on some of my sprites in one of my tk2d sprite collections. The colliders were working fine when the game was running, but later I adjusted some colliders in that same sprite collection on some different sprites, and then all of a sudden the box colliders on my aforementioned sprites suddenly would not work anymore during runtime.

After trying all kinds of things, I found a way to fix the problem: Select the game object in the Editor, and then in the Inspector change its sprite to a different sprite and then switch it back to the original sprite. After I did this for each of my faulty sprites, then they worked perfectly once again. So if this happens to you again, try switching the sprites in the Inspector and see if it works for you.