how can i zoom between 2 locations? (baldur's gate 3 or sims 4 style character creation zoom)

Hi, I’m working on a character creation screen for my game and I want to make the player able to zoom in and out to see their full character. here’s the catch though, I’m trying to make the camera zoom between 2 locations (1 for the character’s face ( the closest) and the second one for the full body ( the furthest)

think of it like the Baldur’s gate 3 character creation system ( or sims 4, they’re basically the same)

I already have a function to zoom (see attached) now I need to know how to make the zoom happen between 2 locations

the function

Should be able to just move the camera boom/spring arm. How are you currently switching between face/body edit modes? Wherever that happens, I’d call a new function on the player char which has a bool input. Function would have a branch off the bool,and if true sets the relative location of spring arm to 0, 0, [whatever Z the head is at], and if false sets it back to 0, 0, 0 or wherever it normally lives for you.

Hi, I’m using a button on the UI to switch the edit mode but I’m planning to change it so that when the spring arm’s length is less than 70 (value to be changed, it just seems like a good value) the UI switches to the body modifications.

The UI really doesn’t matter for now as I’m just trying to get the camera zoom system done before being able to switch it but thanks for the idea

what I planned in my head was to make the spring arm’s z socket offset move up and down according to the target arm length

I managed to get the result i wanted by making it simpler, i made two action mappings for a zoom in and a zoom out and made this code to make the spring arm socket offset go up and down while being clamped to some values

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.