How does Unity implement the recording and playback function

foreword

A recent VR project needs to implement a third-person perspective playback function. If this function is purely for art to K animation, it will obviously be very labor-intensive and the reusability is extremely poor, so I thought of a solution. The general principle: use the first person to control the character's behavior, and then use the frame synchronization mechanism to record each frame of the user's effective operation and store it. Finally, when we play it back, we can follow the user's real operation instructions, frame by frame Restore the behavior of the first person. In this way, art students only need to do some simple animation clips that are common.

unit frame

Let's first determine the frame unit class ·Frame· recorded by the playback system

    public class Frame
    {
   
    
    
        public int frame;
        public int cmd;
        public 

Guess you like

Origin blog.csdn.net/qq563129582/article/details/128807079