VR Physics hands, the right way.

<h1><strong>Intro/Preamble</strong></h1> <p>Throughout my time spent learning how to do virtual reality (VR) physics, I&rsquo;ve seen a couple of examples thrown around about how to make your hands physically interact with the world. By physically interact, I mean when you move your hand or controller from one place to another, if there is something in the way in the virtual world, it should stop. Sounds simple enough right?</p> <p>Unfortunately I have spent a large many months trying various ways of solving this problem. From SteamVR&rsquo;s weird Unity integration, to setting the velocity of the hand every frame, everything I&rsquo;ve seen is just weird. Recently I have been seeing PD controllers being used to solve this problem, which is a great way to go about it. The problem with them is that there are lot of edge cases, can get very complex very quickly, and there is not a large amount of documentation online regarding how to properly use them in a game engine. The tutorials that try to explain them do not understand the math they are showcasing, they do not understand how to keep it simple.</p> <p>Instead of all of this, we are going to use something that is somewhat engine agnostic, and relatively simple to wrap your head around, a joint. In game physics, joints are used as constraints between two bodies. For example, let&rsquo;s say I have two objects I want to weld together, and have them act as one. I would use a joint for this, and lock any motion away. Joints can also be used to have objects repel each other, track each other and more.</p> <p><a href="https://medium.com/@alecpizz/vr-physics-hands-the-right-way-4846ec1eae71"><strong>Website</strong></a></p>
Tags: Physics Hands