Hello Guest

Author Topic: 3.5 Spite Collider Problem  (Read 7613 times)

markpollard

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
3.5 Spite Collider Problem
« on: March 21, 2012, 01:36:17 pm »
I have a Batched image for a floor set up with colliders( none trigger ones ). If i create a primitive cube and add a collider and a rigidbody to it it will fall and balance ontop of the floor. But .... if i create a sprite with a polygone collider when i build the sprite it wil keep falling though the floor.

Please Help
Thanks
Mark

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 3.5 Spite Collider Problem
« Reply #1 on: March 21, 2012, 02:10:10 pm »
2 polygon colliders can't collide in Unity, unless one of them is marked as convex. This is a limitation of the PhysX engine used by Unity. This isn't really a bad limitation, as convex-convex collisions are very expensive to process. The best way to build a sprite with complex colliders, colliding with a mesh collider ground, is to use multiple convex hulls and/or primitives.

gecko

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: 3.5 Spite Collider Problem
« Reply #2 on: July 01, 2012, 07:37:57 am »
I'm having problem with this two. 

I'm confused I upgraded to 1.75 and changed out my player and other sprite  textures then tried to test game and collisions stopped working.  I'm trying to figure out if this is from the upgrade or the swapping of sprites.

Details   

I have multiple sprites set with polygon colliders and triggers and one player sprite with a polygon collider as well.  I can't get them to collide anymore like they used too this as is stated in the posts above.

 1. tried making the player sprite convex - still not working
 2. tried making the other sprites convex - doesn't work as well
 3. both of them convexed as in one and two works - in another post you stated that this is expensive.
 4. switching player to box trimmed works but is not accurate enough. 

Questions:

1. are their any other options for more accuracy as my player sprite can't get close enough to the other sprites with four before colliding and 3 is expensive as you mention on another post
2. I seem to remember before my upgrade and swapping of sprite textures being able to set sprites to a collider that displayed multiple colliders.
3.  Can I revert back to the previous version of 2d toolkit to test that or will it break something?





unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 3.5 Spite Collider Problem
« Reply #3 on: July 01, 2012, 09:29:02 am »
How was it set up before you upgraded?

1. Not sure what you mean. Can you post a screenshot?

2. There wasnt a feature that did this...

3. Should be fine. Backup your project befire you do just in case... I dont test downgrading as often as i do upgrading from various versions. Once you downgrade, re-Commit the affected sprite collections and reload the scene.