Saving and Playing Snapshots

Hello everyone,

I am working on a project with an Infrared hand tracking camera which has an Unreal Engine plugin.
In my pawn class, I have a skeletal mesh and I assigned the plugin’s skeletalmesh together with its animation bp to it. Therefore, the hand is simulated according to my real time real world hand movements. Only right hand btw. However, when the camera cannot track my hand (instant lose of tracking due to being too close or far to the camera), the hand in the game turns into a default pose which is not convenient for my game design. The plugin actually has two functions already: one (1) detects the start of tracking, the other function (2) detects the end of tracking so I can indicate what to do in case of the lose of hand tracking.

One solution I thought about is to save pose snapshot in EventGraph of animation blueprint constantly until the function 2 (2) turns a boolean to true: bool IsHandLost for example.
And every time the function 1 detects the hand again, this boolean will be false and the “save pose snapshot” will continue to be executed constantly.

In animgraph, just before the last node which plays the animation from the hand tracking camera’s function, I used blend poses by bool, using bool IsHandLost.

I connected the camera’s animation (real hand movement simulation) to the FALSE pose.
For True pose, I connected the “Pose Snapshot” by using the name of snapshot that I created in EventGraph with “Save Pose Snapshot”.

However, nothing happens when the condition is true. The hand is still simulated as its default pose which I don’t want. When I record an animation and connect it to the true pose, it works perfectly so there is nothing wrong about the logic and connections of my nodes. The problem is either saving or playing the snapshot. Maybe the complete opinion is wrong so the snapshot cannot work as I imagined.

Can you please suggest me another solution? or fix the problem in my solution?
To sum up, the hand is simulated with my real hand movements but it is sometimes lost because the camera loses tracking. In such conditions, I want to use “the last pose” before it was lost. Then when it comes back, the transition of pose will be smooth.

Thanks in advance.

Hi and welcome to the gamedev community.

This site is primarily for supporting the GameDev courses and as such we don’t support development that is not connected to the courses.

We cannot spend time on user projects unfortunately.

Privacy & Terms