Daggerfall Unity VR with the Vive Pro

Discuss coding questions, pull requests, and implementation details.
Vwing
Posts: 12
Joined: Thu Aug 29, 2019 11:33 pm

Re: Daggerfall Unity VR with the Vive Pro

Post by Vwing » Mon Sep 02, 2019 9:18 am

VR input works now, and raycasts are consistent. There are some other things I could do related to UI, but I want to tackle the low hanging fruit preventing gameplay first.

So. Combat. I'm thinking for a first pass I'll just grab some low-poly meshes from the asset store, and spawn them in your hand(s) according to what items are selected in the character sheet. For bows, I'll use the default SteamVR longbow asset. For blades and other swung weapons, I'll just measure how fast you're swinging it and count it as a hit if you collide with an enemy fast enough. I think the player is going to be pretty OP in this first pass, but it's a first pass so :P

User avatar
Interkarma
Posts: 4833
Joined: Sun Mar 22, 2015 1:51 am

Re: Daggerfall Unity VR with the Vive Pro

Post by Interkarma » Mon Sep 02, 2019 10:28 am

Welcome to the forums, and great work on what you've accomplished so far! :)

Vwing
Posts: 12
Joined: Thu Aug 29, 2019 11:33 pm

Re: Daggerfall Unity VR with the Vive Pro

Post by Vwing » Tue Sep 03, 2019 3:54 am

Thanks!

Here are the assets I've gathered so far. I'm going to keep them out of version control for now, since altogether they're pretty hefty in filesize.

Image

Still need to find a mace, flail, and staff. But I might put those off and use grey boxes for now, just so I can get to the fun stuff :)

Vwing
Posts: 12
Joined: Thu Aug 29, 2019 11:33 pm

Re: Daggerfall Unity VR with the Vive Pro

Post by Vwing » Wed Sep 04, 2019 6:15 am

Nevermind, the flail was fun stuff :lol:


https://www.youtube.com/watch?v=_xRFZmqA5PY

User avatar
Interkarma
Posts: 4833
Joined: Sun Mar 22, 2015 1:51 am

Re: Daggerfall Unity VR with the Vive Pro

Post by Interkarma » Wed Sep 04, 2019 7:22 am

Haha that looks fun! :D

User avatar
Nystul
Posts: 1375
Joined: Mon Mar 23, 2015 8:31 am

Re: Daggerfall Unity VR with the Vive Pro

Post by Nystul » Wed Sep 04, 2019 2:38 pm

looks awesome, though the chain links magically become more and less depending on pose and action ;) and chain behaves a bit like rubberband in action

Vwing
Posts: 12
Joined: Thu Aug 29, 2019 11:33 pm

Re: Daggerfall Unity VR with the Vive Pro

Post by Vwing » Wed Sep 04, 2019 7:55 pm

looks awesome, though the chain links magically become more and less depending on pose and action ;) and chain behaves a bit like rubberband in action
Yeah. It's by no means realistic, lol.

I tried making it more like you'd expect it to work, with the chain links each being a physics joint and the ball hanging at the end, but it didn't work at all. Was either jittery or it fell in slow motion, depending on how I tweaked the settings.

So the ball is now directly attached to the end of the handle with a single joint. At first there was none of that rubber band effect, but it just wasn't very fun to swing... it was like the ball was swinging around on a solid bar of metal. I figured it was already unrealistic, so I might as well make it fun, so I added some springiness to the joint and tweaked things until it was easy to swing at different speeds and circumferences.

The magical chain lengthening is an intentional effect to keep it feeling solid. If I figure out how to do the original "realistic" design, I'll remove it, but I'm moving on to other things for now.

User avatar
Nystul
Posts: 1375
Joined: Mon Mar 23, 2015 8:31 am

Re: Daggerfall Unity VR with the Vive Pro

Post by Nystul » Wed Sep 04, 2019 10:26 pm

yeah, sounds reasonable ;)
looking forward to play with the flail in vr ;)
is the demo somewhere on git? if not, no problem

Vwing
Posts: 12
Joined: Thu Aug 29, 2019 11:33 pm

Re: Daggerfall Unity VR with the Vive Pro

Post by Vwing » Thu Sep 05, 2019 12:37 am

Yeah, I can put up the flail at least. You can find the demo here https://github.com/Vwing/daggerfall-unity-1 in the 'VR' branch.

Flail demo is in VR/Demo/Weapons/Flail.unity. I've added some toggleable targets. Hit the white cube on the floor to toggle them on or off.

You can see the current state of VR in the game in VR/Demo/Daggerfall/DaggerfallUnityGameVR. Or you can start it with the normal DaggerfallUnityStartup scene; I changed the build settings to load it. Grip activates laser pointers, trigger while gripping activates whatever the laser is pointing at. Pressing down on the joystick opens the menu.

Um... those are Oculus bindings. You'll need to set up the bindings for anything else. https://valvesoftware.github.io/steamvr ... Input.html

User avatar
Nystul
Posts: 1375
Joined: Mon Mar 23, 2015 8:31 am

Re: Daggerfall Unity VR with the Vive Pro

Post by Nystul » Thu Sep 05, 2019 6:43 am

thanks so much! will try this out :)

Post Reply