How to detect Collision between two different nodes ..?

How to detect Collision between two different nodes ..?
0.0 0

#1

I am making a game where one sprite had added on two different nodes … and i am moving one of node by means RotateBy() …

How can detect collision between those two sprite.
I have Tried

Sprite* sprite1 = Sprite::create();
sprite1->setPosition(400,200);
this->addChild(sprite1);

Node* myNode = Node::create();
myNode->setPosition(600,200);
this->addChild(myNode);

Sprite* sprite2 = Sprite::create();
sprite2->setPosition(0,0);
myNode->addChild(sprite2);

RotateBy* rotate = RotateBy::create(2,180);
myNode->runAction(RepeatForever::create(rotate));

and checking collision in scheduleUpdate()

if(sprite1->getBoundingBox().intersectsRect(sprite2->getBoundingBox()))
{
  log(".....");
  
}

I am Moving sprite1 throught screen
Above is not Working so far …
Any Help…apreciated…


#2

rotation is not calculated in intersectRect


#3

What should i use alternate to intersctRect …