I asked a question the other day about a camera actor moving with player but not parented to player.
Everynone tried to help me and his solution worked, but for some reason I had trouble replicating it myself. So I went back to that original camera actor idea. I got it to work. Now the problem is, I do not want the camera to move down when the player crouches. This way this setup could do a fighting game and a side scroller.
On the left side of editor window there is panel with objects hierarhy. There is camera attached to “camera arm” object. Move camera arm object (together with camera) up in hierarchy and attach camera arm to collision capsule.
Thanks for trying to help but this is a separate camera actor that moves when player moves. But I was able to fix it, just referenced the character mesh and not the capsule component.
I want to try this, but I do not know exactly what those two nodes are after the cast, the third seems obviously a promoted to variable (float), what are these first two nodes after the cast? Thanks.
If you edit ThirdPersonCharacter and add there variable, then first node after cast to reads that variable from ThirdPErsonCharacter.
Second node is Select, if variable that you created in ThirdPersonCharacter is enumerator, then you can use select and assign float value to ever enum value.
The way I do this is actually in the character blueprint itself. I never use the crouch function. Instead, I create a Boolean isCrouching? And in the animation blueprint, get that and set it to a new Boolean for the animation blueprint. The character now crouches, but the camera stays the same.
It is not hard to make the camera be an observer inside the the character blueprint. If you are using a spring arm, there are checks to inherit character movement, and I think on the camera itself as well.
I was able to get it to somewhat work, if the player just does a flat footed jump straight up, but if there is any movement left or right the cam stops and as soon as the player touches the ground the cam warps to the new position.
I’m not sure how to solve this problem, the is falling bool and branch can stop cam movement if player is in air, so thus the Z, I guess I need to have the cam keep moving in the Y, but I’m not sure how to go about that here, I had thought perhaps just use another setactorlocation node just for the Y, but for some odd reason that does not work.
If anyone has any insight here it is appreciated, thanks.