SpringArm Location/Rotation does not Follow Parent

Hi, I have been taking the section5 Toon Tanks part of UE4 C++ courses. I found some issues of the SpringArm and Camera that is attached to the PawnTank. Basically I when I drag a BP_PawnTank to stage, the SpringArm has different location from the PawnTank and the spring arm location seems to be always in the middle of stage.
This is what it looks like: (the tank can be put behind the camera)


I tried to find out why this is happening, and it seems the SpringArm has a relative location that’s always the negative of the PawnTank location.
I have no control over SpringArm location in BP_PawnTank which is different from the video tutorial.

I can adjust manually to avoid this strange location offset issue. But another related issue is when I move on to create the game mode blueprint and let the game mode creates the default Pawn class(which is BP_PawnTank). Basically I can move the pawn but the camera does not follow the movement of pawn any more. The camera always looks at the middle: (I put game start on the left)

I doubt if the CameraActor from the scene is used by default.
If I eject, click on the pawn and possess again, I will have follow-able camera again.
These are two strange issues I encountered and I cannot proceed right now. Please help and thanks in advance! (My UE version is 4.25.3, let me know if more information should be provided)

Are you able to edit the translation of the camera/springarm on the instance you have in the world?

If you comment out the UPROPERTY, compile, uncomment, does the translation settings come up in the blueprint editor?

If you mean the Location/Rotation/Scale variables, yes I can edit translation of the camera/spring arm on the instance I have in the world.

Sorry could you clarify which UPROPERTY I should comment out & uncomment? I did not set UPROPERFY for Location/Rotation of springarm/camera. I think it is using the default one.

If you mean comment & uncomment the springarm/camera UPROPERTY in PawnTank class, I tried and the translation settings remained the same in blueprint editor. (for spring arm, no Location no Rotation just scale)

Thanks

Did you try resetting the location and rotation to 0 of both the spring arm and camera? and then altering just the spring arm?

I did, to be extra clear. This:

// UPROPERTY(VisibleAnywhere)
USpringArmComponent* SpringArmComponent;

Thanks for your help!

Yes, I can reset location and rotation for the instance I put in the world. The problem is in the following lectures I need to automatically spawn the pawn in the world. I cannot adjust the location/rotation of the auto-spawned instance.

Yes I have tried this. When I commented out the UPROPERTY I saw nothing in the details panel. Then I uncommented the UPROPERTY I still could not see location/rotation for the springarm. This is what it looks like:

I’m having exactly the same issue - in both parts (my spring arm was in different place and later, camera is not following the player after setting up game mode blueprint). I’m using Unreal version 4.22.3.

For me, the one-time workaround (unfortunately) for this it to “eject” the player and modify some property of the camera or the spring arm (e.g., “target arm length”). After re-possession camera is starting to follow the pawn.

Could you try either creating a new blueprint or completely commenting out the component, compiling, uncommenting, compiling.

Hi, I tried both but the problem was still there.

Would you mind sending me your project using the following link?

https://gdev.tv/projectupload

Please use File > Package Project > Zip Up Project within Unreal as this will ensure only required files are zipped up and things like the Binaries are excluded.

Hi, I have uploaded the project. Thanks

So attaching it to the BaseMesh seems to have fixed the transform panel, make BaseMesh protected and then

SpringArm->SetupAttachment(BaseMesh);

Then it popped up and was able to edit it.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.