I have Player blueprint with CameraBoom (SpringArm) and Camera attached to it. I want to script (through BP) that the camera rotates around the player (90 degrees per second). I made simple blueprint script:
It works, but the camera’s rotation is not affected (so the camera rotates around the player but it still looks forward, not toward the player). If I rotate the CameraBoom in Blueprint editor, camera rotates correctly. If I change CameraBoom in the blueprint script above to Camera1 (so the camera should rotate without moving), nothing moves (when start the game by hitting Play button).
nobody can help me ??? You need rotate camera like this in every third person game, so why cant you write me the answer (I am sure most of programmers on this forum know it)??
Just checking: does the camera have boom as its parent?
Btw, the “third person blueprint” project example that comes with the engine has a functioning character setup in the way you want, have you checked it?
yes, the camera is a child of the boom. The blueprint in my question changes the position of the camera (correctly), but doesnt change rotation. Third person blueprint example uses the option “Use controller view rotation” and it rotates camera automatically. But it has no more options and I dont want to use it. I want to create my own BP to rotate the camera.
You can try setting Use controller view rotation to 0 (unchecked, its a boolean) for camera boom, after you set the rotation, but if you want the character to be controlled by the camera again you will have to re-enable it after your action is complete. Just drag off camera boom you may have to turn off context and type view rot and it should pop up towards the bottom of the list I think.
I found the answer. I forgot to uncheck “Use Controller View Rotation” in Camera option (I thought it is only in SpringArm options, but it was in Camera options as well)