Closed DrBeef closed 4 years ago
There's a bunch of other ZScript, Decorate and ACS functions that disregard the Y-coordinate entirely when it comes to supposed screen-space.
Thanks, but frankly I don't fully understand the problem. When I am playing in no VR mode shots from a shutgun seem to be also in a straight line. I can not see much a difference on walls. The holes look more or less the same in no VR and VR modes.
Anyway, the fix, seems to work as the holes on walls are now more diagonal.
Curious.. I was originally testing with the Meatgrinder mod, which the fix I have given you will resolve, however if you are playing with Brutal Doom, it requires a different fix (which I discovered last night). The difference is very pronounced. However I don't understand how it could be working fine in non-vr mode, since this is an issue caused specifically by the use of overriding the pitch based on controller orientation, which is removing the "random scatter" element of various projectiles (hence them all appearing in a line). I'll post the other part of the fix here, if I get a chance I will post a short clip of the difference between a shotgun with and without the fix.. it is very obvious.
Thanks, but frankly I don't fully understand the problem. When I am playing in no VR mode shots from a shutgun seem to be also in a straight line. I can not see much a difference on walls. The holes look more or less the same in no VR and VR modes.
Anyway, the fix, seems to work as the holes on walls are now more diagonal.
Original Shotgun was always a straight line. But supershotgun was not. You can test with that. Also here's a DAKKA mod which shotguns and chaingun also demonstrate the issues quite obviously: http://git.jinotra.in/ijon/dakka Basically anything that comes from player and has a vertical angle has said vertical angle removed.
Here's a couple of comparison videos so you can see the difference. In this example I am using the Brutal Doom double barrelled shotgun. However it is the same for any weapon where the script tries to apply a random pitch element to the bullet spread.
This is what you see in the unfixed version:
And this is an example from when the fixes are applied ( this is from QuestZDoom ):
I'll try to summarise the changes required, it is a bit more required than the original change I suggested unfortunately.
Thanks, now I am seeing the difference. I tried to merge your changes but I stumbled on code which you added in SetUp method
player->mo->AttackPitch = -weaponangles[PITCH];
player->mo->AttackAngle = -90 + (doomYaw - hmdorientation[YAW]) + weaponangles[YAW];
Is it just orientation of the weapon controller ?
I think it might be easier if I fork and make the changes in your branch (as I don't think you need to take on some of the changes like those above, I expect you can get away with a minimal number) so that you only get the bits required to resolve the issue. I'll then submit a pull request with the changes and you can merge (and fix any build issues, shouldn't be any, but I won't be able to build your code, so I will keep the necessary changes to an absolute minimum).
Does that sound ok?, otherwise I might be coaching you through changing great chunks of this port that don't need to change as they work perfectly well already.
Let me know what you think.
Yes please, if you could make a PR it would be great.
I've got the changes committed to my own fork, but want to double check my changes (I'll test them in QuestZDoom, as they are the same) and do some more testing before I submit. Should be ready in a day or two..
Thank you, I really appreciete your help with this.
I've created the PR. I'll let you close this issue if you are happy with the results :)
I tried to merge it but there is one issue. I put a commentary in PR. Anyway it seems its working, will be in the next release. Once again thanks for help.
No problem, as I mentioned on the PR, it will be fine without the AttackPitch and AttackAngle bits of the change. As it seems to be working and is in the next release I'll close this issue for you :)
Hi, I must admit, I've not tried it myself, but our mutual friend Ajantaju tells me that this version suffers from the same issue that QuestZDoom had, whereby the projectiles from a multi-projectile weapon, such as shotgun or repeated shots from a chaingun are all flat in spread (there's no random pitch applied).
I have come up with a solution, it's not perfect, but it gets the job done, figured you would be interested in seeing it.
In p_mobj.cpp, in the function, P_SpawnPlayerMissile, where the source->player->mo->OverrideAttackPosDir is used to override the aim with the orientation of the controller, I changed the calculation of pitch to the following (I have retained the comment here so you can see why I did it this way):
I hope that helps (assuming you do indeed have this same issue)