VR Climbing with both hands. Left hand no longer connected to MotionController

This is the code from my Project:

I have the problem that I would like to be able to climb with two hands. For this I created a class for the Character, one for the MotionController and one for the SkeletalMesh. As you can see in my repository.

In the character class I spawn two MotionControllers and set the tracking source.

In the code from MotionController I then spawn a SkeletalMesh as soon as it is spawned. I intentionally do not assign this to the MotionController. This is because of a later thing I want to implement.

The main problem now is in SKeletalMeshHand.cpp. There I set in the function void ASkeletalMeshHand::SetLocationAndRotationOfRootScene the location of the hand to that of the MotionController. When this code is active, the following happens:
Now when I access with the left hand and pull up. Everything works great. If I grab with the right hand and pull myself up, there is an offset between the MotionController and the SkeletalMesh of the left hand.
I don’t understand why though?

The white cube is the MotionController. The SkeletalMeshHands transform is set to the transform from the MotionController each frame. When I grab, set location wil be no longer set, so that the hand remains in the place where it was grasped

If you want to see a video of my bug, check this link: VR Climbing with both hands. Left hand no longer connected to the MotionController - C++ - Unreal Engine Forums

1 Like

Hi and welcome to the community.
Is this related to the course or is it your own project? if it is your own project, the best place to ask these things is over on the discord.

We unfortunately cannot help out with personal projects as we don’t have the time due to the number of students seeking help.

Thanks for the quick reply. Unfortunately, I was not aware of this. It is a little of both. I took the UE VR course from you guys. The climbing mechanics, which was shown to us there, I am now trying to expand so that you can climb with two hands. In the process, I ran into the problem.

I would really like to help but I can’t spend too much time on this - my focus needs to be the courses.

However, something I had issues with was using the hand controllers as RightController and LeftController. Not everyone encounters this - it’s a real quirk but if you change the variable names to TheLeftController and TheRightController, this could work - not promising anything.

Sorry I can’t be of more help. Ask over in Discord - people there are generally very helpful.