Hello Guest

Author Topic: Unity 2D OnCollisionStay2D bug found?  (Read 6687 times)

dbanfield

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 30
    • View Profile
Unity 2D OnCollisionStay2D bug found?
« on: November 17, 2013, 06:55:29 pm »
Hi,
I'm pretty sure I found a bug in the new unity 2d collision system. Posting here first though to clarify, as I found it using the 2d toolkit tile map system.

To reproduce:

  • Open up the attached project
  • press play
  • Debug lines will indicate that the player is currently on a vertical normal
  • press the left key to walk up against the wall on the left. Stop there.
  • hold down space for a short while
  • the debug lines will stop - obviously, you are off the ground  ;)
  • when you land again, still no debug lines
  • walk a little to the right, continue walking on this chunk, still no vertical normal. Huh?
  • With further debugging you will find there are no registered contact points with a vertical normal. This is surely incorrect since you are quite clearly standing on the platform


If you could please take a look and clarify whether or not I'm missing some blindingly obvious thing, but it seems pretty clear cut. If there is a problem, can file a bug with unity.

Thanks
Dan

Edit: Removed attachment, please only post attachments in the private support forums.
« Last Edit: November 17, 2013, 07:02:14 pm by unikronsoftware »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Unity 2D OnCollisionStay2D bug found?
« Reply #1 on: November 17, 2013, 08:02:26 pm »
Yup, that looks very clear cut. If you were going to submit this to Unity, I strongly recommend removing all the tk2d stuff so they don't try to shift the blame - I've tried it, you can reproduce this with a box and a hand drawn edge collider in the same L shape you have there.

dbanfield

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Unity 2D OnCollisionStay2D bug found?
« Reply #2 on: November 17, 2013, 08:39:08 pm »
Thanks for the confirmation. Took your advice and modified the project to not include 2dtoolkit. Bug submitted - was expecting a confirmation email with a link to the issue as the FAQ describes but nothing yet. Will post it here when it comes through in case anyone's interested.

dbanfield

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 30
    • View Profile