I’m using Advanced Locomotion System V3; I’m using this one and not V4 because I find its movement more suitable for my project.
My question is, how do I zoom the camera in on the character? By default, it starts far away, and I wanted to be able to start with it closer. However, despite the spring arm being set to a low value (“target arm length = 100”), which would be more or less the distance I wanted, the camera still moves back initially to a value of 300 when starting the level. After looking at the code, I discovered that there’s some kind of camera lerp that defines this value and how the camera will behave, being:
“GREEN: Which behaves as the initial camera movement
BLUE: Which behaves as the camera movement when aiming
ORANGE: Which behaves as the movement when releasing the aim”
And there’s the “Update Camera Event,” but I can’t change the target arm length value, which remains grayed out at the fixed value of 300.
I tried changing the camera lerp graph, but somehow changing it breaks the logic, and the camera doesn’t behave as it should, often going out of focus. What I need is for the camera to behave exactly as it already does, but much more efficiently. Close to the character without being too far away.
NOTE: The camera shouldn’t just be dragged forward, as it might work initially, but if it hits a wall, the camera will pass through the character, which could cause problems later on.
Later in that updatecamercomponent it looks like its setting up to lerp from the read ‘current’ values to the final values (using the curve). Whatever is setting the final values it’s lerping toward in that function should point you to the source of where youre values come from. It’s probably read in from a data asset or in project settings.
I couldn’t find any information in the project settings. The closest I got was trying to change the curves, but even that didn’t work very well. If you open the file, try moving the camera or the spring arm; the problem occurs there.
Here’s the ALS v3 project if you want to take a look. I believe it’s only possible to open the file in versions 4.18 to 4.23, as stated in the official Epic Games FAB template.
That curve is likely multiplied by or a lookup is done on it from a value somewhere in that updatecameraevent. Trace that value back to it’s source (right click and find by name (all)) or to where it’s being set, should point to the value you actually need to change. It’s likely the curve just adjusts the speed of the interpolation to the final value.
This could be handled by a PlayerCameraManager too, look around for that… i think later version had this, maybe was in v3.
I was looking for the name (all) as you said and ended up on this tab and saw that the target camera settings in the “first node” was linked to node B of the lerp. When I removed the camera, it went to something like first person, so I realized that putting a “-” with the value 150 seems to work. I didn’t adjust that 300 value for the target arm length (it’s as if I used that value as a reference to start with 150). Although it seems like a workaround or a different way of working, it still seems to work, so that’s what matters in the end. So far it’s working in my tests. Thank you, my friend.
look inside that choosecamerasetting function (double click it), it should get you closer to the source of the data. it probably has logic to pick between data sources based on your current character movement state (running, walking, crouching, etc)