Hello Guest

Author Topic: Collider glitch (sprite being pulled into collider)  (Read 4369 times)

Pfaeff

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Collider glitch (sprite being pulled into collider)
« on: September 04, 2016, 08:28:31 pm »
Hi there,

I am experiencing a strange issue regarding 2D colliders. I have a tilemap set up that uses tiles with different collider types. Most of the time, everything works fine, but there is a case where the player is not repelled by an obstacle but rather pulled directly into it. And I can not explain why this happens.

I made a quick video of the issue and my setup here: https://www.youtube.com/watch?v=omz3CQWSMBQ (it has annotations to highlight what's going on)
Any idea what's happening and what can cause this?

Greetings,
Pfaeff

PS: Crosspost in the Unity Forum: http://forum.unity3d.com/threads/collider-glitch-sprite-being-pulled-into-collider.429606/
« Last Edit: September 06, 2016, 11:43:57 pm by Pfaeff »

Pfaeff

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Collider glitch (sprite being pulled into collider)
« Reply #1 on: September 07, 2016, 12:27:09 pm »
I identified the problem: https://www.youtube.com/watch?v=19IEFWtWQFg

It seems as if the collider isn't put together correctly. I suspect the "WeldVertices()" routine in tk2dTileMapColliderBuider2D is the cause of this.
« Last Edit: September 07, 2016, 01:46:13 pm by Pfaeff »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Collider glitch (sprite being pulled into collider)
« Reply #2 on: September 11, 2016, 12:22:01 pm »
Interesting...
Can you submit a repro in the private support forum? I could take a quick look to see what's causing this.