Hello, i created a blueprint, containing a trigger box, a camera and a spline. The goal is to set up a camera system similar to god of war, castlevania lords of shadow, etc. So far ive successed at doing these, but is a little buggy.
I was wondering if i could help some help with the following, or if anyone knows a better way to do it, im all ears.
Once i drop the blueprint on the level, and set the spline, i’ve set a check to see if the user wants this camera to be constrained to a curve. At which point it also checks which direction the player is moving. Then it goes through and moves the camera through the spline like its supposed. Except is not accurate, and when i enter another one of these blueprints ( trigger boxes) it just doesnt work.
What id like to be able to do is to drive the camera through the spline using the player movement. So when i start moving the joystick, the camera moves as well.
I am posting more screenshots to see if anyone can help me.
This is how i plan on drive the camera. By first storing the location of spline points onto arrays. Then setting the position of the camera to the closest point from the player. Finally i plan to move the camera through the curve by using the “Get World Location at Distance Along Spline” node. And subtracting the position array of the player location, with the position array of the camera location, then subtract the vector length of those 2 from the spline legth So far this has yield weird results as when i step into the trigger box it doesnt react like i expected to. Instead the axis on the controller are inverted. I had set a check on the trigger if the player steps on it so that it lets the character blueprint know that it needed to use the forward and right vector of the camera ( on the direction is viewing) But now itseems that the only way to make camera advance properly on the curve is by pressing forwad ( the up key )