Creating a specific Camera Movement. Need some help

Hey you awesome people,

i need some help with a camera movement i want to create.

The Camera should only move when the character is a specific min or max distance away from it.

Also the Camera stays in place if the character just runs left or right. So he circles the camera.

I tried using a Springarm, but i can’t get an algorithm into my mind where i can use this to change the min and max distance. I tried to check the distance from character to camera and change the spring arm length base on it, but this makes the spring arm flinge back and forth. Would it be better to unlock the camera from the character?

:confused:

Hi!

Yes,it could be easier to separate the camera from the character, or the other solution would be that the camera moves in the opposite direction as your character.
I guess that it works. At least this the main idea.

I had a setup where I wanted the player to be able to either stick with the character or move the camera independently (think mobas).

There is a setting where you can tell the springarm to not stick to the character but use a world location instead (sorry I don’t have an engine around right now so I don’t know the exact name of that setting :S) and then move it via a simple vinterp towards your character if he is too far away.

Andras suggestion with a separate actor for camera would achieve something similar though you couldn’t use the character for camera logic anymore but had to get the camera manager each time. Not a real problem just a choice of setups.

Erasio:

I can’t find an option to cut off the location. Only the rotation. Without the spring arm, i would need to code the collision backwards for the camera to not fly through walls or?

I guess i need to code the whole system new. Make my own “SpringArm”. I have the camera to follow me and get pushed away so far. And my Controller Rotation gets updated to the
correct rotation so that pressing “Left” will make me run a circle around the camera.

One problem i have now is: My Mesh jitters when not moving straight left,right,front,back. Could this be because of my constant Controller Rotation update? (Yaw only).