Using UE as a simulator

Hi All

I’m new in UE, so sorry if my question sounds naive/misplaced. What I want is (pseudocode)

void DoSimuate( int numFrames )
{
  InitUE();   // initialize UE engine
  scene = CreateScene();   // create a scene with some objects and characters
  fpr (int i = 0; i < numFrames; ++i) {
    Step();  // tick, update the scene
    for (int i  = 0; i < scene->numObjects; ++i)  // 
     GrabObjectAnimation(secne, i);   // grab objects (bones) motions
  }
  CloseScene(scene);  // destroy the scene 
}

In other words, I want to use UE for characters animation, all outpit I need is bones’ animation at every frame (no Render, no char’s meshes etc). Is it possible with UE? Or it’s not a good idea?

Thank you