2d "camera" follow target looks ugly

Im sorry, but I have try (if Im correct) every and each single solution has been presented here.

The “solution” you mentioned here:[quote=“KAMIKAZE, post:7, topic:36509”]
Long time ago I’ve faced the same problem. That was cocos2d-iphone. Solution was - update physics and camera at same -(void) update: method. Worked well.
[/quote]

I am actually implementing it:

  • setup:

    getPhysicsWorld()->setAutoStep(false);
    getPhysicsWorld()->setSpeed(5.0f);
    getPhysicsWorld()->setGravity(Vec2(0, -98));
    schedule(schedule_selector(GS_1::MyUpdate), 1.0f / 90.0f);

-update:

void GS_1::MyUpdate(float dt)
{
    getPhysicsWorld()->step(dt);
    actionLayer->update(dt);
    getDefaultCamera()->setPosition(cameraTarget->getPhysicsBody()->getPosition());
    getDefaultCamera()->update(dt);
}

Also, I implemented the solution mentioned in the links you provided
(How to fix Jittery Side Scrolling with Box2D) & (Fixed Time Step and Box2D)
and even if using all of these methods kinda solves or make it less obvious the problem of the jittering on the camera, some “secondary effect” persists, like the fact that children’s bodies have a small delay, seems like thery are updated at a diferent time.

I appreciate your solutions and clarifications, specially from you (@anon98020523) and (@almax27). You have helped me a lot. And now I could say the jiterring is not bothering me anymore.

I just think that this “secondary effect” is part of the same problem. I dont think im repeating a question, and definitely im not ignoring any answer (I even made a list of the result of each answer given). I think I am showing another side effect of the same problem which current solutions does not fix.

I created another thread because I think If someone else search specifically for it would be easier to find, and I dont consider it the exact same question. But…to be honest, seems like if anyone knows (and answers) in this forum is mainly both of you (and some how I think is conected to this issue)

I repeat: now I could say the jiterring is not bothering me anymore, So I guess I wil set this as solved.
Thanks everyone for the help, I really appreciate it.