Hello Guest

Author Topic: Rigidbody Material Friction For Polygon Collider  (Read 6793 times)

tireddad

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Rigidbody Material Friction For Polygon Collider
« on: October 12, 2012, 06:15:44 am »
Hi,

I am having some trouble here. In my test level I have 2 game objects. 1st gameobect is a sprite with a polygon collider created with 2DTK , no collider cap, and Convex checked inside the 2DTK sprite collider editor (It has the default z-axis size) and a rigidbody attached.

2nd is another sprite, this one has collider unset and a manual box collider added to it in Unity3d (so that I could increase the depth of the z-axis for the collider). The 2nd gameobject also has a rigidbody attached.

Now, the 1st gameobject is resting on the 2nd gameobject and the 2nd gameobject is moving. I am finding that I cannot add friction to the 1st gameobject rigidbody material such that it will move with the 2nd gameobject based on friction. I think that the reason is because the 1st gameobject has insufficient surface that is in contact with the 2nd gameobject. I do not see a way to set the Z-axis size on a polygon collider.

Has anybody encountered this issue? I need to resolve this as it is critical to my game design.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Rigidbody Material Friction For Polygon Collider
« Reply #1 on: October 12, 2012, 09:10:42 am »
You can set the z depth globally for the sprite collection in Settings > Collider depth.

tireddad

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Rigidbody Material Friction For Polygon Collider
« Reply #2 on: October 16, 2012, 05:16:54 am »
Thanks Unikron, much appreciated.