Game Development Community

Pickpoint & transparency

by John Coyne · in Torque Game Builder · 08/13/2006 (7:48 am) · 4 replies

Hi
I have sprites where the visible parts dont overlap, but the invisible parts do. The sprites call a function when they are clicked. What I need is a way to ignore clicks on the transparent part of the sprite. Is there a simple way to do this?

#1
08/13/2006 (8:27 pm)
I need to know how to do this too. I was thinking of using collisions since you can redefine the bounds of the collision box to match an image. Instead of doing a normal pick we would have to cast a collision to see what is under the point.

Since you are working on this right now could you do me a favor and reply here if this works (or if you find another solution?)

Thanks! ;)

-Unk
#2
08/14/2006 (2:50 am)
I think pickPoint() also uses the collision poly for the test.
#3
08/14/2006 (5:26 am)
SetCollisionPolyCustom seems to do the trick thanks :)
#4
08/14/2006 (6:37 am)
Awesome. Thanks guys.

-Unk