Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: warwind10 on December 08, 2011, 01:04:35 AM

Title: How to make GUITexture detect collision?
Post by: warwind10 on December 08, 2011, 01:04:35 AM
I want to make a GUITexture that would detect collision with another GUITexture. I've been trying since yesterday but with no luck :( can someone help me?
Title: Re: How to make GUITexture detect collision?
Post by: MABManZ on December 10, 2011, 03:31:12 PM
a texture cannot collide with something...only a collider. Create collider components for each object and use the collider volumes to detect collision.
Title: Re: How to make GUITexture detect collision?
Post by: Alex Chouls on December 10, 2011, 11:32:29 PM
Colliders are the way to go. You could try to detect overlapping rectangles but it would probably not be as robust as Unity's built-in collision system.

If you decide to build your own, I'd recommend writing a couple of simple actions: GetGUIElementRect and RectsOverlap. These do seem generally useful, so I'll add them to the next update...