Create Animator

An animator is a component. So you just have to create Animator as a normal component.

Like below :

void myAnimator(std::shared_ptr<KapEngine::GameObject>gameObjectPlayer) {
    // Create animation manager (animator)
    auto animator = std::make_shared<KapEngine::Animator>(gameObjectPlayer);
    gameObjectPlayer->addComponent(animator);
}

Last updated