Hi I have a Jittering problem. It jitters from center of screen to bottom left. My Actor class which inherits off Node is being set to be followed. It does work if I set sprite to be followed but then there is a problem. What If I need multiple sprites and it be better to just follow the CActor Node. Also setting it to sprite is just avoiding the problem and I will not learn why this is happening.
Here is my code
//CREATE ANIMATED SPRITE
auto sprite = Sprite::create();
sprite->setScale(1);
Vector<SpriteFrame*> animFrames;
animFrames.reserve(8);
for(int i = 0; i < 8; i++)
animFrames.pushBack(SpriteFrame::create("player.png", Rect(i*128, 0,128,128)));
Animation* animation = Animation::createWithSpriteFrames(animFrames, 0.1f);
Animate* animate = Animate::create(animation);
sprite->runAction(RepeatForever::create(animate));
this->addChild(sprite, 0);
//SET TO BE FOLLOWED
this->runAction(Follow::create(this, Rect::ZERO));