Mouse to only select non transparency?
by Azmodeus · in Torque Game Builder · 10/05/2006 (12:35 am) · 5 replies
Has anybody done a mod so that mouse clicking will only select an object if it is clicked on a non transparent part of the object?
#2
10/05/2006 (12:43 am)
PS the collision polys are fine for collision, I'm just dealing with mouse selection at this point. So just need to determine if the player actually clicked on a pixel of the sprite itself (excluding transparent pixels).
#3
10/05/2006 (8:16 am)
I'm thinking custom c++ functionality to compare the clicked location on the sprite with the alpha information at that point. I don't have a clue how to do that but it would be where I'd start researching.
#4
10/05/2006 (8:32 pm)
Yea that is the problem, the c++ code is soo large, its like finding a needle in a haystack to find out where to begin coding.
#5
10/08/2006 (4:54 pm)
You could also mount t2dSceneObjects onto your objects to represent multiple convex collision shapes.
Torque Owner Azmodeus
So now the question is, what about a way to auto create a collision polygon based on the sprite itself, or similar?
Because my objects are odd shapes and having only convex shaped polygons just isnt going to work.