Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MYGuy

Pages: [1]
1
Support / Collision Between Two Sprites
« on: August 07, 2013, 07:20:09 pm »
I'm trying to have Unity print a message with OnTriggerEnter. Both sprites have colliders and one has a kinematic rigidbody and trigger. I am using transform.localposition to move the kinematic sprite into the other. They also have the same z-position and z-scale. I could get a sprite and a cube to collide perfectly, but for some reason two sprites is a no-go for me (despite hours of trying).

I'm sure it's something simple but I'm all out of ideas. Any help appreciated.  :-\

Edit: This is another case of a newbie not reading the documentations carefully enough. Per the Unity documentation:
http://docs.unity3d.com/Documentation/Components/class-MeshCollider.html
Quote
Mesh Colliders cannot collide with each other unless they are marked as Convex. Therefore, they are most useful for background objects like environment geometry.
Both of the sprites had polygon colliders, so setting to convex after the fact made them detect each other appropriately. Sorry for the trouble.

Pages: [1]