So far most of the simple object interactions work well in VR, but there's one problem: the player's hands don't collide with the environment.
Because I'm just using SteamVR's controllers as hands in their [Camera Rig] prefab, there isn't much I can do about this. The hands are colliding with objects in the scene, allowing you to knock objects around, but they don't collide with static geometry. The question in doing this is that if the hands collide with static geometry, there will be a difference in position between the player's hands in real life and in VR. Originally this was thought as a no-no in VR--You don't separate the player's real body from VR body. After extensive testing, many developers are going against this trend as having hands pass through objects is more immersion breaking than a little space between the hands. Because VRTK's animated hand models rely on having the ControllerEvents script in a parent object to animate, I wouldn't be able to do this; in order for the hands to collide with static geometry they need to be separate objects from the controller alias scripts but track with them. I ended up modifying the VRTK's animated hand script so I can manually drop the scripts in the inspector. No big deal. But I still needed a good way to have the hand rigidbody move with the controller but still collide. VRTK does have a good RigidbodyFollow script that seems to work exactly as I need with a cube, but not so much with the hand prefabs. I'm gonna continue working on it to get the desired effect. Additionally, I really want the player to have arms that collide as well, so I've been looking for a good IK solution that will allow me to do this. I found a really cool script online that I can apply to any rigged body, then parent the hands to the controllers and the player will have a full body. Should be pretty cool. Either that, or I'm going to mess with VRArmIK (I think that's what its called), a great Unity Asset that is essentially plug and play--though it's been a little more difficult because I'm using VRTK. Either way, I'll figure it out. Thanks for reading! - Judah
Powered by
Powered by
|
About MeAside from being a game developer and CEO of MidnightCoffee, Inc, Judah teaches game design to middle and high school students. He is also a professional magician and retro game enthusiast. Categories
All
Powered by
Powered by
|