I am desperately trying to make my game as modular and upgradeable as possible
That means, that while it works to put a camera on a springarm in my pawn blueprint, this isn’t good because
a) I’d have to do this in every pawn blueprint
b) what if I decide I want my springarm length bigger? I’d have to change every one
c) or change a setting on the camera. I’d have to change every one
I thought I had initially found a solution, because I made a parent pawn blueprint for all my pawns and on THIS blueprint I put the SpringArm and Camera and this worked initially, because when I changed a setting it would work for any pawn.
The problem was that as soon as I started to move my pawn, the camera didn’t move with it. Because the camera is attached to the root of the blueprint, and not the static mesh that is being moved by the physics thrusters (how I am doing it in this case). (I don’t understand how to get ALL components of a blueprint to stick together.)
And because I made the camera on the parent, I can’t move it to be attached to the static mesh, which would replicate how it works if I just make the camera in the pawn blueprint.
So I came up with possible solutions:
a) instead of putting the SpringArm+Camera in the parent pawn blueprint, I add it in the constructor blueprint. I had a lot of trouble doing this and couldn’t in the end even get it to work, let alone working well.
the way I would like it to work is: create Springarm, attach to static mesh (which I supply to the function), then create Camera and attach to SpringArm. I don’t seem to be able to find an attach function that lets me use those things, only Actors or ActorComponents, and no casts/conversions are offered. Plus I don’t know how to adjust the length of the SpringArm in the blueprint AT ALL
b) have it so my pawn stays attached to itself the entire time. In the parent-pawn I have a capsule as the root, and static mesh of my child-pawn blueprint attaches to it. If I turn hidden-in-game off on the capsule I see it just sits there, even when the thrusters boost my static mesh around. IF I could get that to attach itself to the capsule then this whole thing would work
c) a completely different solution to the camera. perhaps a camera actor or camera blueprint that constantly references and follows the current pawn around at the distances I set for it. I don’t “get” camera actors nor understand if they are appropriate for this and have no idea how I would spawn one of these camera blueprints.
I appreciate any advice
Thanks