Jump to content

Help making a mod that locks the camera behind player


Recommended Posts

I'm trying to make a mod that locks the camera behind the player all the time, not just auto-centers every once in a while. To my knowledge there no mod that does this yet.

 

I was hoping to get some help I've tried a bunch of things but I can't find the right command to permanently lock the camera behind geralt not just auto-center every once in a while (new to modding/coding :geek: ). Anyone know a way to do this?

 

Alternatively if anyone can link me to a mod that already does this I can just take a look at their code & make a standalone version.

 

Thanks!

Link to comment
Share on other sites

You probably want to turn character with mouse, not lock camera to character's back? THAT would look and feel weird (imagine how it would look if you strafe or go back).

lol yeah correct i worded that poorly

Edited by Glitcher
Link to comment
Share on other sites

 

 

You probably want to turn character with mouse, not lock camera to character's back? THAT would look and feel weird (imagine how it would look if you strafe or go back).

lol yeah correct i worded that poorly

 

I guess you need to add listeners to GI_MouseDampY/GI_AxisRightY (camera movement) GI_AxisLeftY (character movement) - how to do look game/player/playerInput.ws, then adjust either character (already adjusted when moving) or camera (adjusted when you don't move camera for some time and character moves in different direction) depending on what you want. You can see movement adjustment in game/player/r4player.ws in OnEnumAnimEvent, and you can find camera adjustments in the same file in OnGameCameraTick. Experiment, try to understand how it works. This game has quite a spaghetti code in scripts, but in most cases it's managable.

 

On a second thought - most likely you don't even need new listeners, probably just changing some event handlers will be even better.

Edited by Demoniko
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...