I extended the default VR template with custom grip animations in the animation blueprint and then blending them with other animantions via the ‘grab type’ enum. This enum is changed on gripping an item and set to ‘None’ again when the item has been released. And if the grab type is set to ‘None’, animations are set to the defaults that comes with the template.
This works fine when I only use a single hand. But if I now grab the same item very quickly between the left and right hand, the animations of one or the other hand is not reset to the default animations.
I think this is because when the hand is grabbed by a single hand, the grab type is changed and is no longer ‘None’ for both hands, as they have both the same animation blueprint.
How can this issue be solved without creating animation blueprints dedicated for each VR hand ?
Maybe I found the solution to fix this issue. I have to set the grab type in the animation instance of the other hand that is no longer grabbing, and set it to ‘none’ as soon the other hand has the same grab type. All what I do now is changing the grab type in the same anim instance.
I found the reason, but not the solution. Nothing I’ve tried to get a reference of the anim BP for both VR hands worked
Basically, I need access to a variable in the Anim instance of the right hand within the Anim instance of the left hand and vice versa. I tried to get a reference to both anim instances from the vrpawn, but that didn’t work.
Finally I could get references of the animation blueprint of both hand meshes by an interface applied to the vr pawn.
When using the default vr template and if you copied the code from the pistol to your custom grab item, be careful when you grab this custom item when it’s already grabbed by the other hand. Any blueprint code that is fired by ‘on dropped’ will never be fired as the item has not been dropped.