Afterimage character
Step 0.
Let's make a character afterimage.In this time, we will use a single character with additional skeletal mesh component(Not a additional pawn).
Step 1.
We need a animation blue print and character class.a. Add new 'SkeletalMesh Component' to AfterimageCharacter.
b. Store all data for afterimage.
c. Set old data for afterimage SkeletalMesh.
AfterimageSkeletalMesh's AnimClass is changed. Original skeletal mesh's AnimClass is still 'ThirdPerson_AnimBP'.
Ignore component rotation. It will be changed in game.
Step 2.
This is the animation blueprint.In this case, very simple. Compared to 'ThirdPerson_AnimBP', you will know the purpose immediately.
Step 3.
These are save and load functions.Step 4.
Tick event.If the speed is sufficient, store the data.
If the stored data is sufficient, restore the data and remove one.
The remaining issues.
Multiple afterimages?More component. I think this is the only answer.
Optimization?
Should make a ring-buffer with C++ to store data.
Store less data(20 time or less per second) and calculate the missing value in reverse.
Kill Cam.
If you want instant replay system(simple kill cam), the basic idea is the same.
But you may have to spawn a new character(or pawn). Because component based replay system may not working if the owner character can be removed(dead and destroyed).
Full Replay?
If you need high accuracy replay just like 'League of legend' it's a totally different story!
This comment has been removed by the author.
ReplyDeleteHow to add motion for AfterImage Mesh?
ReplyDeleteIt can only have base third person walk and jump
thx