What are the news?
We have just made a page in our book app for coloring. With 95 pieces. In which transperency should not be hitTested(
Forgot that unfortunately there is no way to make it in Corona. [import]uid: 13989 topic_id: 18203 reply_id: 318203[/import]
I’m having trouble understanding your question.
Are you saying that obj.isHitTestable = true is not working? Or obj.isHitTestable = false?
Could please elaborate on what the actual problem is?
Peach
[import]uid: 52491 topic_id: 18203 reply_id: 69643[/import]
Sorry, I was a little upset yesterday. Also sorry for my english.
The problem:
in a display object pixels with alpha channel = 0 (transparent) should *not* be hitTestable. And the ones that have alpha channel>0 (visible, non-transparent), *should* be.
So that we could have hitArea with irregular shape.
As far as I know there is no way to make it in Corona. [import]uid: 13989 topic_id: 18203 reply_id: 69670[/import]
Ok, I’m figuring it out.
_Site search gave me nothing, but the forum’s one has found some relevant results:
http://developer.anscamobile.com/forum/2011/10/23/hittest-against-polygon-or-transparent-image
http://developer.anscamobile.com/forum/2011/08/21/how-ignore-transparent-area-when-touch-image
http://developer.anscamobile.com/forum/2011/03/30/touch-event-hittest-transparency
http://developer.anscamobile.com/forum/2011/05/10/touch-events-transparent-png
http://developer.anscamobile.com/forum/2011/10/04/hit-test-transparent-objects_
The thing is now hitArea with irregular shape is possible with object.isHitTestMasked = true
A that is awesome! All these cases are solved with it.
But I have many objects (95). So, as I see it, a spriteSheet should be used.
And the solution that I see here is to use another spriteSheet for masks (actually it would be the same spriteSheet).
So, it turns out that the feature request is the ability to use sprites as masks.
[import]uid: 13989 topic_id: 18203 reply_id: 69685[/import]
Hey Fox,
It’s OK - and your English is quite good, it’s just that I want to make sure I understand before answering.
Are you saying you have ONE image that needs to have parts of it being hitTestable and parts not?
If so, that isn’t quite possible yet - but you should post a request in the subscribers only feature request forum - Ansca does their best to help implement things users want.
Peach [import]uid: 52491 topic_id: 18203 reply_id: 69687[/import]
Hey Peach,
Thank you for your reply!
I think I’ve outstripped you a bit (if it’s the right word)) with my previous comment. I’ve found that “ONE image that … have parts of it being hitTestable and parts not” actually is possible in the latest builds with .isHitTestMasked = true.
And my request has transformed.
Also you say
you should post a request in the subscribers only feature request forum
Isn’t it the place?
[import]uid: 13989 topic_id: 18203 reply_id: 69692[/import]
Hey Fox, sorry, I was replying to a post in another tab and got a bit mixed up. (The request was similar and I was checking usernames to see if both posts were the same person or not.)
For masking, yes this is a possibility although as you said, 95 is a lot of objects to do this with.
I shall pass on your request in our next meeting - my apologies again, this IS the correct forum, you are right.
Peach [import]uid: 52491 topic_id: 18203 reply_id: 69756[/import]