Unreal Engine4 学习笔记1 状态机 动画蓝图
1.动画蓝图 包含 状态机 包含 混合空间BlendSpace,即状态机包含在动画蓝图的"动画图表中",而混合空间可用于在状态机中向某(没)一个状态输出最终POSE:

动画蓝图一共包含两个东西,除了上面提到的动画图表,还包括了一个事件图表。动画图表中,状态机内肯定有一些变量来决定状态的转换,比如"isInAir","speed"等。而这些都可以在"事件图表"中得到并设置:

动画又是怎么和我们控制的角色关联起来的呢?
第一种方式是通过Character蓝图,然后如图有相关选项进行关联,下图的例子关联了动画和Mesh

2.新建的c++项目,是不包含Character类的, 但包含一个parent class 为 GameMode的类
关于出生点,最好是在GameMode类的基础上新建一个GameMode蓝图,然后在蓝图中设置Default Pawn Class:

然后还要在设置->世界设置中进行设置:

关于输入,这样的代码出现在Character类中:
void ABatteryCollectorCharacter::SetupPlayerInputComponent(class UInputComponent* InputComponent)
{
// Set up gameplay key bindings
check(InputComponent);
InputComponent->BindAction("Jump", IE_Pressed, this, &ACharacter::Jump);
InputComponent->BindAction("Jump", IE_Released, this, &ACharacter::StopJumping);
InputComponent->BindAction("Collect", IE_Pressed, this, &ABatteryCollectorCharacter::CollectPickups); InputComponent->BindAxis("MoveForward", this, &ABatteryCollectorCharacter::MoveForward);
InputComponent->BindAxis("MoveRight", this, &ABatteryCollectorCharacter::MoveRight); // We have 2 versions of the rotation bindings to handle different kinds of devices differently
// "turn" handles devices that provide an absolute delta, such as a mouse.
// "turnrate" is for devices that we choose to treat as a rate of change, such as an analog joystick
InputComponent->BindAxis("Turn", this, &APawn::AddControllerYawInput);
InputComponent->BindAxis("TurnRate", this, &ABatteryCollectorCharacter::TurnAtRate);
InputComponent->BindAxis("LookUp", this, &APawn::AddControllerPitchInput);
InputComponent->BindAxis("LookUpRate", this, &ABatteryCollectorCharacter::LookUpAtRate); // handle touch devices
InputComponent->BindTouch(IE_Pressed, this, &ABatteryCollectorCharacter::TouchStarted);
InputComponent->BindTouch(IE_Released, this, &ABatteryCollectorCharacter::TouchStopped);
}
Unreal Engine4 学习笔记1 状态机 动画蓝图的更多相关文章
- Unreal Engine4 学习笔记2 动画蒙太奇
动画蒙太奇出现的位置是在动画蓝图的动画图表和事件图表中,如下图 事件图表,可以看出在主线执行的结尾,如果is Punching 为true,则会执行一个我们自定义的Punch Event,用来播放动画 ...
- iOS学习笔记-自定义过渡动画
代码地址如下:http://www.demodashi.com/demo/11678.html 这篇笔记翻译自raywenderlick网站的过渡动画的一篇文章,原文用的swift,由于考虑到swif ...
- jquery学习笔记(四):动画
内容来自[汇智网]jquery学习课程 4.1 显示和隐藏 在jQuery中使用 hide() 和 show() 方法来隐藏和显示 HTML 元素: hide()的语法形式:$(selector).h ...
- jquery学习笔记-----事件和动画
一.ready机制 $(document).ready( function(){} ) $().ready( function(){} ) $( function(){} ) jquery的read ...
- !!学习笔记:CSS3动画
一句话就有css3动画: 2016-6-29 <style type="text/css"> h1{background:#999;} h1:hover{border- ...
- iOS学习笔记09-核心动画CoreAnimation
http://www.cnblogs.com/liutingIOS/p/5368536.html 一.CALayer CALayer包含在QuartzCore框架中,具有跨平台性,在iOS中使用Cor ...
- Unity Shader学习笔记 - 用UV动画实现沙滩上的泡沫
这个泡沫效果来自远古时代的Unity官方海岛Demo, 原效果直接复制3个材质球在js脚本中做UV动画偏移,这里尝试在shader中做动画并且一个pass中完成: // Upgrade NOTE: r ...
- CSS3学习笔记之loading动画
效果截图: HTML代码: <div class="divBox"> <div class="loader"> <div clas ...
- IOS开发学习笔记022-imageView实现动画
这里要播放的动画是很多张连续的动画,连续播放就会显示出动画效果. 大概过程是: 新建一个single view application ,然后添加一个image View控件到视图.给image vi ...
随机推荐
- centos7 python3.5 下安装paramiko
centos7 python3.5 下安装paramiko 安装开发包 yum install openssl openssl-devel python-dev -y 安装pip前需要前置安装setu ...
- Python之列表、字符串、元组和字典的基本用法
1 模块初识 Python的强大之处在于他有非常丰富和强大的标准库和第三方库,几乎你想实现的任何功能都有相应的Python库支持,以后的课程中会深入讲解常用到的各种库,现在,我们先来象征性的学2个简单 ...
- SDL播放声音
extern "C" { #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> ...
- springboot 整合Redis
0.导入 maven依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifact ...
- (转) Docker swarm 之介绍与使用
今天,在站内看到一篇关于Docker Swarm 的文章,非常好,在这里转过来,方便日后查阅 :) 原贴链接: http://www.cnblogs.com/rio2607/p/4445968.htm ...
- POJ 1979
这是一道比较水的DPS的题目 题意就是求你可以走到的黑色的地板砖的块数,@代表你的起点,也是黑色的地板砖,#代表白色的,则说明你不能走,这就是一个广搜的题目 思路也很简单,如果你周围的那块地板是黑色的 ...
- 【python】python新手必碰到的问题---encode与decode,中文乱码[转]
转自:http://blog.csdn.net/a921800467b/article/details/8579510 为什么会报错“UnicodeEncodeError:'ascii' codec ...
- Delphi TcxCurrencyEditt控件说明
金额类控件说明: AlignWithMargins:是否显示边框.由Margins 属性来设置边框的值 Anchors:控件停靠,来处理窗口最大化或是调动里的位置 AutoSize:是否自动变化大小 ...
- ada 图形编辑器 - GNAT GPL
The GNAT GPL and SPARK GPL Editions are made available to the free software developers by AdaCore. T ...
- 在java项目中使用AES256 CBC加密
首先要注意一点,默认的JDK是不支持256位加密的,需要到Oracle官网下载加密增强文件(Java Cryptography Extension (JCE) Unlimited Strength J ...