how to get CompositeSprite's child by world position?
by KevinYuen · in Torque 2D Beginner · 03/04/2013 (7:36 am) · 3 replies
I created a isometric map by CompositeSprite, now i want select tile sprite through world position.
but can't find any functions about that, call help... thanks!
but can't find any functions about that, call help... thanks!
#2
You can now perform the following operations:
I have pushed the work to the development branch.
03/04/2013 (12:33 pm)
I've took the time this evening to add picking to CompositeSprite.You can now perform the following operations:
- .pickPoint()
- .pickArea()
- .pickRay()
I have pushed the work to the development branch.
#3
isometric tile is a lozenge, they're in same layer, so i'll pick two tiles one-time if click tile's edge. like this:

•.pickPoint()
•.pickArea()
•.pickRay()
These methods can't seem to meet the demand. it maybe need a function like IsPtInLozenge(...) or IsPtInIrregularPolygon(...)
03/04/2013 (7:07 pm)
Thank you for your reply :), but i have a another question :(isometric tile is a lozenge, they're in same layer, so i'll pick two tiles one-time if click tile's edge. like this:

•.pickPoint()
•.pickArea()
•.pickRay()
These methods can't seem to meet the demand. it maybe need a function like IsPtInLozenge(...) or IsPtInIrregularPolygon(...)
Associate Melv May
- Logical Position i.e. (0,0) {1,0}, (-5,-2) etc.
- Sprite Id (you get this when you add a sprite)
- Sprite Name (you can assign a name to a tile).
What you want is sprite "picking" and that is not currently implemented. It's extremely high on my list of things to get in. I'll try to get this done for ASAP!Sorry for the delay.