I have drawn a circle using the DrawNode function.
Then I am checking to see if the user is clicking the circle or not
Here I am creating the circle
DrawNode *drawnode = DrawNode::create(); drawnode->drawDot(ccp(10, Director::sharedDirector()->getVisibleSize().height / 5 ), 10, Color4F(2, 99, 2, 2)); drawnode->setPosition(Point(winSize.width / 2.1 + origin.x, winSize.height / 5 + origin.y)); this->addChild(drawnode);
Here is where I am checking to if the user is clicking the Circle
if(Level::drawnode->getPosition() == touch->getLocation())
CCLOG(“Circle has been clicked”);
CCLOG(“Circle has not been clicked”);
The problem is this if statement keeps going to the else statement.
How do I get the circles position on the screen so that when the circle is clicked correctly