Spawn a camera with a spring arm as parent?
The gist of what I'm trying to do: (FYI: In case you're familiar with the game, I'm trying to recreate the camera system from the Animal Crossing minigame in Nintendoland)
I've got my current project set up for one player to be able to controll two characters on one screen simultaneously. The way I'm currently handling the camera is by spawning a CameraActor in my CharacterController BP following this tutorial.
The camera actor then gets positioned at the average location of the two controlled characters and then out some, always looking at the average location while also maintaining the same distance to it on a perpendicular plane to the imagined line between the two characters. This ensures that the character assigned to the left analog stick of the gamepad always stays on the left side of the screen and vice versa, which is key to making that controll scheme playable at all.
After I had failed to spawn said camera in conjunction with a spring arm component as its parent, I ended up resorting to what little of my high school math was still there and used a simple pythagorean operation to determine the coordinates for the camera to maintain its relative position to both characters.
This worked fine for the time being, but as I'm trying to refine the cameras behaviour more and more it's becoming clear, that a spring arm component and the fact that it rotates around the pivot at the tip of the arm would suit my needs (and lack of programming experience) much better.
So, my question is: Looking at the provided BP screencap below, is there a way I can work with my existing setup and have the camera have a spring arm component?
NB: The part where the camera is spawned is in the small comment box at the lower right of the screencap. The rest is just there in case it might be useful to know what I'm trying to do.
Chances are, that I'm being terribly impractical and overcomplicating things in my BP. I'm very new to scripting. I'd of course also be thankful for any pointers towards simplifying it. Or how to utilise components of either the player controller BP or the one of the two character BPs for my purposes (I've tried but failed to do so).
Thanks for reading and for your help in advance! :)
asked Sep 26 '14 at 04:53 PM in Blueprint Scripting
Figured it out after trying again today. I actually don't know what went wrong back then.
answered Dec 22 '14 at 09:10 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here