How to get the visible rect of the node? Sometime i need to hide 50% of the sprite, if the touch point is in the hidden part, just return but not to active the callback function.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no default functions, maybe you need to create your own class to handle it.
You can try to create a subclass of CCNode with a changeable CCRect as touchable area, or you can try to read the Image Raw data and detect if the touch position pixel is transparent or not.