The solution would be not to code camera moving.
Hey @Mirro1871!
It’s difficult to know what you need with so little context. Are you using a first or third person camera? Is this for a menu, a puzzle or something else? What is the end goal you are trying to achieve?
Any additional specifics or info you provide may go a long way in solving your problem!
ARE YOU TALKING ABOUT A PLAYER’S PLAYER CHARACTER CAMERA OR ARE YOU TALKING ABOUT LIKE A CCTV CAMERA ON YOUR VIDEO GAME’S STREET OR SOMETHING
If you mean in the editor you can just right click the camera in the viewport or outliner and under “Transform” tick “Lock Actor Movement”
If you have c++ class after you wrote code for direction and movement for your character . Instead of rotating the character with the controller, we will do something so that the character rotates with direction and movement. First we write these code in character.cpp
include "GameFramework/CharacterMovement.h
Then In ACharacter::ACharacter()
bUseControllerPitch=false
bUseControllerYaw=false
bUseControllerRoll=false
Now we sure that character dosent move with controller
GetCharactermovment()->bOreintRotationTo movment =true
Getcharacter…()->RotationRate=FRotator(0.f,54.f,0.f)
Getcharacter…() ->JumpZVelocity=600.f
Getcharacter…()->AirControl=0.2f
Then in shooterBP make sure that Changes have been made
Make a camera actor BP, open it and add a camera, compile and save and close it, drag that bp into the map, in your level BP use a set view target with blend and switch to that camera, presto!
Hey @Mirro1871,
It’s still hard to tell with no context as to the effect you are trying to achieve. Can you provide context into how the camera should work in the game you are making? Should the camera stay in one spot as the character moves around the level like a platformer camera, be locked in place at a certain height like an isometric camera, stay behind the player like in a third person shooter, etc.
Unfortunately, you can not simply lock your camera from the details panel in your blueprint, and will need to tell the camera how to act.
Any additional specifics you provide may go a long way in solving your problem!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.