I’m trying to export the camera transforms (world coordinates) from a rigged camera with Python. (Cine Camera Actor on a Camera Rig Rail)
However, I can’t seem to advance the time to get the whole sequence of frames. The transform seems always to stay the same.
My code is roughly as follows:
for frame in range(total_frames):
frame_num = unreal.FrameNumber()
frame_num.value = frame
frame_time = unreal.FrameTime(frame_num)
position = unreal.MovieSceneSequencePlaybackParams(frame=frame_time)
sequence_player.set_playback_position(position)
# Get the evaluated world transform of the camera actor
transform = camera_actor.get_actor_transform()
Putting a play/pause after the set_playback_position doesn’t seem to help. Putting a time.sleep() just blocks UE5.
Any ideas what I can do to get the transforms for every frame?