hh79 / gzdoomvr

Classic Doom/Heretic/Hexen games in stereo 3D and VR; modified version of gzdoom.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Suggestion] make Main-hand and Off-hand controller position available for zscript

iAmErmac opened this issue · comments

Can you please make these controller data available in zscript so I can add two handed interactions?

AttackPos
AttackPitch
AttackRoll
AttackAngle
OffhandPos
OffhandPitch
OffhandRoll
OffhandAngle

Please check this QuestZDoom commit for the code changes required: DrBeef@9155ab7

Examples of what kind of interactions are possible using these info:
https://streamable.com/zm5mb6
https://streamable.com/zg15sy

I wonder if you could somehow make a proper interactable Bow with ZScript like that...
Also are those holster zones part of QZD, or are they ZScript scripting as well?

I think it's possible to make 2 handed bows with zscript, but i'll have to check in the codes. A lot of regular zscript functions like LineAttack (hitscan), SpawnPlayerMissile (projectile) are working in VR on a limited scope (i.e. they ignore a lot of offset adjustment parameter for the sake of simplifying translating weapon movements with the controllers), that's why even though this seems like a simple task, it can turn difficult on actual implementation.

Everything you are seeing in the teaser videos are scripted with Zscript (ie. no QZD exclusive code) but with additional offset/roll/angle/pitch data from the controllers. I'm improving a lot of mechanics to bring up more fun stuff. Right now this mod is going to be QZD exclusive since GZDoomVR needs an update first with those controller offset/roll/angle/pitch data exposed to the Zscript. QZD is also getting some real offhand weapon system soon which may be a little difficult to port back into GZDoomVR (reason why I didn't mention). Right now I'm asking only for the basic controller data made available in GZDoomVR. Honestly building and testing mods in PC is way easier than testing and debugging every single thing on-device, these changes will make my life easier and will increase the pace of mod development.

An alpha of this interactive mod will be available in my Github soon. The VR Flashlight mod is already available and is compatible to GZDoomVR although I've used a hack to get it working with the main hand, right now the off-hand supported version works only in an experimental version of QZD (the off-hand features will be available in official QZD soon).