A constant force according to nodes angle

i want to make a rocket that follows another node i made it so that the angle of the rocket will always face the node its supposed to follow is there a way to make the rocket constantly move in that direction?

ohhh so easy for you look up cocos Follow::create(); thay have done it all for you
CCFollow java, or you can do your owen math, good old lerp then rotate
auto dist = squ(xx , yy);
if(dist > 10) {
}

//** or here some fun code for you to play with guess what i was doing :slight_smile:
/*
float diff_X = pt.x -jogWheel1->getPosition().x;
float diff_Y = pt.y -jogWheel1->getPosition().y;
Point diffPoint = CCPoint(diff_X, diff_Y );
float angleRadians = atan2f(diffPoint.y,diffPoint.x);
angleRadians = -CC_RADIANS_TO_DEGREES( angleRadians );
jogWheel1->setRotation( angleRadians + jogWheel1->getRotation());
*/

Have Fun

i am not sure if i understood ur code fully. is that code only rotates the node to face the other node because for that i have found a solution i am searching for a way to make the node travel in the direction it is facing

i found a solution to this