Setup Post-mission Camera
编辑BP_GameMode

新建Actor命名为BP_SpectatingViewpoint
添加摄像机

将摄像机调整到合适的位置,右键选择

调整到合适的位置,点击这个按钮,退出驾驶模式

摄像机已经移动到合适的位置

回到BP_GameMode,在这一位置上设置了摄像机

给镜头移动添加慢动作,只需要修改参数

将上述逻辑连接断开,将用代码实现
在FPSGameMode头文件中新建变量
protected:
UPROPERTY(EditDefaultsOnly,Category="Spectating")
TSubclassOf<AActor> SpectatingViewpointClass;
在FPSGameMode的Cpp文件中修改CompleteMission函数
void AFPSGameMode::CompleteMission(APawn* InstigatorPawn)
{
if (InstigatorPawn)
{
InstigatorPawn->DisableInput(nullptr);
if (SpectatingViewpointClass)
{
TArray<AActor*> ReturnedActors;
UGameplayStatics::GetAllActorsOfClass(this, SpectatingViewpointClass, ReturnedActors);
//找到任何有效actor后,更改目标视角
if (ReturnedActors.Num() > )
{
AActor* NewViewTarget = ReturnedActors[];
APlayerController* PC = Cast<APlayerController>(InstigatorPawn->GetController());
if (PC)
{
PC->SetViewTargetWithBlend(NewViewTarget, 0.5f, EViewTargetBlendFunction::VTBlend_Cubic);
}
}
}
else
{
UE_LOG(LogTemp, Warning, TEXT("SpectatingViewpointClass is nullptr"));
}
}
OnMissionComplete(InstigatorPawn);
}
将之前建的变量赋值

Setup Post-mission Camera的更多相关文章
- Camera’s Depth Texture
[Camera’s Depth Texture] In Unity a Camera can generate a depth or depth+normals texture. This is a ...
- Roomblock: a Platform for Learning ROS Navigation With Roomba, Raspberry Pi and RPLIDAR(转)
What is this? "Roomblock" is a robot platform consists of a Roomba, a Raspberry Pi 2, a ...
- 翻译:GLSL的顶点位移贴图
翻译:GLSL的顶点位移贴图 翻译自: Vertex Displacement Mapping using GLSL 译者: FreeBlues 说明: 之所以选择这篇文档, 是因为现在但凡提到位移贴 ...
- Photoshop CC (2015.2) 2016.1 版
1.设计空间(预览版)增强 Design Space (Preview) 2.画板 3.Surface Pro触屏优化(多种手势) 4.自定义工具栏和工作区 5.字体收藏夹(要死掉一批扩展) 6.库( ...
- 初学WebGL引擎-BabylonJS:第8篇-阴影网格与活动
[playground]-shadows(阴影) 源码 var createScene = function () { var scene = new BABYLON.Scene(engine); / ...
- Setup Mission End
编写FPSGameMode 新建函数OnMissionComplete,并设置为蓝图可实现事件 UFUNCTION(BlueprintImplementableEvent,Category=" ...
- 【Android】Android Camera实时数据采集及通过MediaCodec硬编码编码数据的流程
吐槽: 其实常用流程都差不多,但是有时候还是会忘记某一步的详细用法,但是各位朋友请注意,官方已经不推荐Camera类的使用(现在是android.hardware.camera2),但无奈公司项目之前 ...
- Android 创建自己的Camera App
在sdk中找到/sdk/docs/guide/topics/media/camera.html#custom-camera,里面有详细的api参考 在清单文件中添加相应的权限: <uses-pe ...
- ACM-ICPC国际大学生程序设计竞赛北京赛区(2015)网络赛 B Mission Impossible 6
#1228 : Mission Impossible 6 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 You must have seen the very famou ...
随机推荐
- postman 抓包工具charles的使用
1.直接打开charles,然后,如果有https的话,需要安装证书,然后,设置代理 2.如果不是https的,不需要设置代理,直接抓取就可以 先安装证书: 然后设置代理: ...
- C connect实现Timeout效果(Windows)
int SocketClient::connectTimeOutForWin(SOCKET &connect_fd, const int &timeout, const sockadd ...
- mybatis的一些小知识
<update id="setReaded"> update wa_ent_job_app set IS_READ= 1, READ_TIME=now() where ...
- 当我new class的时候,提示以下错误: Unable to parse template "Class" Error message: This template did not produce a Java class or an interface Error parsing file template: Unable to find resource 'Package Header.j
你肯定修改过class的template模板,改回去就好了 #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")packag ...
- 解决docker多开mysql报错问题
1.vim /etc/sysctl.conf fs.aio-max-nr=262144 重新加载 sysctl -p /etc/sysctl.conf
- smarty实例
login.php代码 <?phpinclude("../init.inc.php"); $smarty->display("login.html" ...
- SQL Server索引的作用
一.深入浅出理解索引结构 实际上,您可以把索引理解为一种特殊的目录.微软的SQL SERVER提供了两种索引:聚集索引(clustered index,也称聚类索引.簇集索引)和非聚集索引(noncl ...
- Django REST Framework限速
官方文档:http://www.django-rest-framework.org/api-guide/throttling/#throttling settings.py配置 REST_FRAMEW ...
- 11、JDBC-Druid
依赖 pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns=" ...
- JDBC-Batch 批量执行
JDBC 批处理 SQL 语句 首先在 jdbc 的 url 中加上 rewriteBatchedStatements=true,只有开启了这个 Mysql 才会执行批处理,否则还是一条一条执行 St ...