Hey I want to make some changes to https://github.com/ersh1/BG3_NativeCameraTweaks.git a mod that changes the way BG3 camera works. What I want specifically is for the camera to move so that it always is looking towards where the actual character is looking at.
I have the project already opened in visual studio and ready to modify.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
I apologize, but I cannot open or directly access the GitHub repository link you've shared. However, I can provide some general guidance on modifying camera behavior in a Baldur's Gate 3 mod.
To achieve a camera that always looks towards where the character is looking, you'll likely need to modify the camera logic in the mod's source code. Here are some steps and considerations:
First, locate the main camera control script in the project. This is typically found in the source files related to camera manipulation.
You'll want to implement a method that:
Tracks the character's current view direction
Smoothly interpolates the camera's rotation to match that direction
Potentially add some smoothing or lerping to prevent abrupt camera movements
Pseudo-code might look something like this:
cpp
void UpdateCameraRotation() {
// Get character's current look direction
Vector3 characterLookDirection = GetCharacterLookDirection();
// Smoothly rotate camera to match character's look
currentCameraRotation = Lerp(currentCameraRotation, characterLookDirection, smoothingFactor);
}
You'll need to find the right hooks in the game's camera system to inject this logic.
Since I can't see the specific implementation of the mod, I recommend:
Checking the existing camera control scripts
Looking for methods that handle camera positioning and rotation
Adding your custom logic to track and match the character's view direction
Would you like me to provide more specific guidance about how to approach this modification? If you can share the relevant code sections, I can give more targeted advice.