Besides that, I have deduced the issue behind the std::bad_cast error and able to reproduce it. The fault lies in the fact that I used two different footbot controllers within my xml file. Hence, the only way of fixing it is using only one of the controllers at a time but the setup that I am planning requires those two controllers to work.
Code: Select all
CFootBotEntity& footBot = *any_cast<CFootBotEntity*>(it->second); CFootBotMobile& controller = dynamic_cast<CFootBotMobile&>(footBot.GetControllableEntity().GetController());
I am wondering if there is any suggestion to solve this issue?