Picking Up Isn’t So Easy


So, despite the fact that I’ve now been developing in VR for one summer and nearly an entire semester, I still find myself going back to maybe the most simplest of things to do (in real life or in VR): picking objects up.

Now, for seasoned VR veterans that might be reading this, I’m sure this problem is probably quite trivial. I mean, even I thought so before I even started programming in VR. “Why would it be difficult? If I can pick an object up with ease in the real world, how hard could it be in the virtual world?”

So far, I’ve approached this problem by trying pretty much every strategy I could find online. The first, easiest-to-implement, and most logical, is to simply parent any object a user wants to pick-up to the remote avatars in the scene. Simple. It takes only a few lines of code, and moves with my controller with ease. Perfect!

But then, the problem changed. Now, I didn’t just want to be able to pick up objects. I wanted these objects to interact with other non-moving, static objects in the scene (a la my drawing mechanics). With this initial strategy, the picked-up object would move itself through the bodies of other objects, whether they had colliders or not. I made pretty much every change I could while still using this parenting technique, but nothing worked.

So, I tried something else: joints. For the most part, this did the trick. Things weren’t walking through walls like they originally were. But, it wasn’t perfect. It still isn’t, actually. Unfortunately, I can’t end this post with some great conclusion on how to approach this problem for future generations. But, what I can say is that developing in VR isn’t ever as easy as it might seem. You figure out the problem you want to solve. You solve it. Then, you realize that wasn’t quite the problem you actually wanted to solve. So, you modify the problem, and start over.

Leave a Comment

Your email address will not be published.