I want to add entities to my arena at some point in the program. As far as I understand, you have to use CFactory::New to do this, instead of just creating the entities yourself. So what I am trying is:
Code: Select all
CEntity pelletEntity = *CFactory<CEntity>::New("box");
CBoxEntity& pellet = *any_cast<CBoxEntity*>(pelletEntity);
pellet.SetSize(CVector3(1,1,1));
pellet.SetMass(1);
AddEntity(pelletEntity);