Page 14 of 15

Re: Daggerfall Unity VR with the Vive Pro

Posted: Fri Sep 06, 2019 7:24 am
by Nystul
how do I activate the flail? I just see my hands in vr but not the flail... ;)

Re: Daggerfall Unity VR with the Vive Pro

Posted: Fri Sep 06, 2019 9:47 am
by Vwing
Just realized I didn't take the flail prefab out of the Untracked folder. Sorry about that. I'll fix it right away.

Re: Daggerfall Unity VR with the Vive Pro

Posted: Fri Sep 06, 2019 9:53 am
by Vwing
Done. There's no activation of the flail in the demo, it should just appear in your hand now.

Re: Daggerfall Unity VR with the Vive Pro

Posted: Fri Sep 06, 2019 12:18 pm
by Nystul
thank you - trying now ;)

now, I see the handle but not the chain and ball - collision/interaction with the objects seem to work though:

Image

Re: Daggerfall Unity VR with the Vive Pro

Posted: Fri Sep 06, 2019 1:41 pm
by Vwing
Okay. Try now.

EDIT: Also, I just finished a first pass at a VR Weapons Manager. You can enter your character sheet, select a weapon, and it will spawn it (or actually a cube representing it) in your hand. Then if you throw it at an enemy, it will damage it with the weapon. Then you can pick it up again with the laser, or go back into the character sheet and unequip/reequip it to reset it back in your hand.
It's pretty rough, but you could technically play the game like this, lol. I'll put up a video later; I worked way too late and I need sleep.

Re: Daggerfall Unity VR with the Vive Pro

Posted: Fri Sep 06, 2019 2:21 pm
by Nystul
yeah now it works, thanks you ;)

this is really amazing. Swinging the flail feels good in vr!

Re: Daggerfall Unity VR with the Vive Pro

Posted: Fri Sep 06, 2019 8:27 pm
by Vwing
Yay! I'm glad you like it :)

Always a good feeling when someone has fun with something you made :D

Re: Daggerfall Unity VR with the Vive Pro

Posted: Fri Sep 06, 2019 10:06 pm
by Vwing
There's actually an interesting little hack I had to do in order to make the flail chain rotate toward the ball correctly. It turns out that SteamVR (or maybe OpenVR?) has some code somewhere that runs after all of the update functions, updating the position and rotation of the controller very shortly before rendering. Which makes sense, you want things to feel as tight and low-latency as possible in VR.

But that made it so that wherever I put the chain rotation code, it would always be a frame behind the actual transform data of the handle. It made it so that the chain was always lagging in front of or behind the ball. The fix was to slap a camera on the flail and execute the rotation code OnPreRender, lol.

Re: Daggerfall Unity VR with the Vive Pro

Posted: Sun Sep 22, 2019 8:26 am
by Vwing
So, I made a lot of progress in the last couple weeks. Finally feels playable, so long as you're okay with sticking to melee weapons. I even made it so the direction you hit an enemy correlates with the direction the weapon strikes :)

https://youtu.be/R340n1rKwls

The flail is the funnest weapon. I think bows will rival it once I incorporate the default SteamVR bow.

This might be a good time to build it as an actual mod and let everyone try it out. I made a few necessary changes to the base code, though. Once I've cleaned everything up a bit more, and incorporated the non-mod-specific code to my master, should I just go ahead and submit a pull request?


EDIT:
If you want to try it out, just pull from my VR branch and import this unitypackage containing the untracked models, textures, audio, etc.

You can play in the DaggerfallUnityGameVR scene.

Re: Daggerfall Unity VR with the Vive Pro

Posted: Sun Sep 22, 2019 12:23 pm
by Nystul
awesome! will give it a try soon! keep up the amazing work