mpstark / DynamicCam

A more dynamic camera for World of Warcraft.
MIT License
24 stars 11 forks source link

Mounting jerks camera #12

Closed Auranim closed 4 years ago

Auranim commented 6 years ago

Hello. I'm posting it here, but I'm not sure if this is the right place, or even if this has already been asked/answered.

I use all my situations with a Shoulder Offset of 1.6. It's how I like to play. Additionally, the transition between my situations is at least 1.5, if not more, so as to provide a smoother transition. However, whenever I mount or dismount, no matter what my settings are, the camera quickly (I'd say over 0.75s) jerks itself to Shoulder Offset 0, and then starts transitioning back to whichever settings I've set up over 1.5 seconds. Is there any way I can remove this quick jerk?

LudiusMaximus commented 6 years ago

Hello! Check out this conversation on curseforge, where I already answered in more detail what is causing shoulder offset differences between mounted/unmounted and different player models. The jerking you describe comes on top of that, but I also took care of it in my fork of DynamicCam.

I suggest you try my fork as described in the curseforge reply and tell me if your problem persists.

Auranim commented 6 years ago

Ooooh, thanks LudiusMaximus, I've just downloaded and installed your code. Will analyse today to see what happens and reply to you as soon as possible =)

Auranim commented 6 years ago

Hey, @LudiusMaximus . I tested your code and it works almost flawlessly. Sometimes when I dismount, the camera goes far to the other direction, but it's nothing that bugs me, in particular. All the bugs I described were fixed and I'm very happy haha. Thank you very much! Hopefully, this will be added to the main addon soon.

Since we have this channel open, I'd like your help, if possible, with a small configuration. When I talk to NPCs, I've set it up so the camera gets really close (min 2, max 3) to the NPC, for that immersive feeling (I paired it to Immersion, the addon, and it's awesome). Except it doesn't always work as intended, especially when I'm not looking straight at the NPC. Sometimes it zooms in fine, but the NPC is not focused. It seems to zoom in in front of my character. Is there any way to make the camera fix itself so the NPC, or its nameplate is always fixed around the centre of the screen?

LudiusMaximus commented 6 years ago

That's great to hear! Yeah, I would also appreciate if my additions would be included in the main addon at some point. I guess mpstark is a bit busy at the moment and I understand that he is hesitant to add foreign code to his addon. Because if my code makes problems people will come to him complaining first and I would understand if he would like to avoid this risk. But that is why I added it as an option you can enable or disable. So if my code starts making problems he would just have to tell people to disable "Shoulder Offset Correction". Well, let's see. But it definitely helps if people like you are confirming that my code helped you!

But what you wrote about the camera going "far to the other direction" on some occasions is something we should further look into. Is it reproducible? Have you checked all you DynamicCam Situations? Maybe you still have one situation set to an odd shoulder offset? Notice, that the shoulder offsets (particularly when mounted) are interpreted differently with my code than they might have been before...

Regarding your question about configuring the "NPC interaction" situation to work nicely with Immersion: I am doing the same! :-D What works best for me is to use "Focus on interact" and a saved "view". Saving a view can be done with the appropriate hotkey or in the console with "\run SaveView(2)" (e.g. for view 2). Just pick a camera angle and zoom that places your character in one corner of the screen (where you will not have the immersion windows) and the NPC in the center. See these screenshots: https://s22.postimg.cc/do0m7z6tt/npcinteraction.png https://s22.postimg.cc/hyfa3tz4x/npcinteraction2.png

Auranim commented 6 years ago

Yeah. Saved views did not work, at all. I tried disabling my nameplates AddOn (Kui) and use the native ElvUI nameplates and it worked a little better, but not too much. It's all good though, I'll explore further. Regarding my unmounting camera thing, I'll investigate some more to see if I can reproduce the error and tag you here whenever I can, if I can

LudiusMaximus commented 6 years ago

Hm, I cannot imagine how "saved views" did not work for you. You do know that you have to save the view you want to use manually before using it in DynamicCam, right?

Keep me updated if you are having any further shoulder offset issues!

Auranim commented 6 years ago

I did a little experimenting and so far, the bug I was having seems to be consistent whenever the game dismounts you. So it does a quick jerk when I'm mounted and click on a plant/metal to gather, when I interact with a quest objective, when I go indoors while mounted and the game dismounts me. It also happens (although not likely for the very same reason) when I'm interacting with a mounted npc while mounted and then dismount (happens when I pull up a transmog mount, interact with the transmog npc from the mount, and then dismount, therefore also dismounting the npc).

LudiusMaximus commented 6 years ago

Thanks for your detailed description! I will look into this. Avoiding these offset jerks in the code all comes down to changing the offset at the right in-game events (or sometimes even with slight delays after these events). So far I have not tried dismounting triggered by the events you describe, so there might be some special handling required here. Will let you know if I can reproduce and hopefully fix this!

LudiusMaximus commented 6 years ago

I tried to reproduce what you are describing. But for me the transition is completely flawless when being dismounted for herb gathering or for going indoors. What you are experiencing might be due to your mount not being in the code yet (as I described in the curseforge post). Try if you are experiencing your problems while mounted on "Albino Drake" (which is already in the code)!

If yes, we have to look further! Are you using the "Mounted" situation of DynamicCam? If so, disable it and try again with "Albino Drake"! Does this work now?

LudiusMaximus commented 5 years ago

I think I found out what the problem is. If possible, try my most recent code and tell me if the problem still persists.

LudiusMaximus commented 4 years ago

This issue will be handled by CameraOverShoulderFix, which can be run as a plugin to DynamicCam. https://github.com/LudiusMaximus/CameraOverShoulderFix https://www.curseforge.com/wow/addons/cameraovershoulder-fix-dynamiccam/files