【发布时间】:2020-10-27 14:39:34
【问题描述】:
我有情况。我想在前进的同时顺利地改变 FOV。在父类的相机设置中,我设置了默认值:
FollowCamera->FieldOfView = 90.0f;
然后在 MoveForward 函数中我这样设置
void AStarMotoVehicle::MoveForward(float Axis)
{
if ((Controller != NULL) && (Axis != 0.0f) && (bDead != true))
{
//Angle of direction of camera on Yaw
const FRotator Rotation = Controller->GetControlRotation();
const FRotator YawRotation(0, Rotation.Yaw, 0);
const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);
AddMovementInput(Direction, Axis);
FollowCamera->FieldOfView = 140.0f;
}
实际上它是有效的,所以当我向前移动时,FOV 变为 140,但它的效果非常粗略,并且会立即发生。我想从 90 到 140 顺利完成。 你能帮我吗?
【问题讨论】:
标签: c++ unreal-engine4 unreal-development-kit