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 ...
随机推荐
- php判断浏览器语言
<?php // 分析 HTTP_ACCEPT_LANGUAGE 的属性 // 这里只取第一语言设置 (其他可根据需要增强功能,这里只做简单的方法演示) preg_match('/^([a-z\ ...
- ModelAndView的介绍
ModelAndView的构造方法有7个.但是它们都是相通的.这里使用无参构造函数来举例说明如何构造ModelAndView实例. ModelAndView类别就如其名称所示,是代表了MVC Web程 ...
- Python连接MySQL的准备工作
首先要安装MySQL,64位的win7可以安装64或者32位的MySQL版本,安装之后,python需要一个工具才能连接MySQL,这个工具叫MySQL-python,去这里或者这里下载1.2.3版本 ...
- 使用html5 FileReader获取图片,并异步上传到服务器(不使用iframe)
使用html5 FileReader获取图片,并异步上传到服务器(不使用iframe) 原理: 1.使用FileReader 读取图片的base64编码 2.使用ajax,把图片的base64编码 ...
- 先进的React GUI编辑器 — Structor,所见即所得!
先进的React GUI编辑器 — Structor https://helmetrex.com/ 手把手教你基于 ES6 架构自己的 React Boilerplate 项目 http://www. ...
- 【leetcode】Word Break II
Word Break II Given a string s and a dictionary of words dict, add spaces in s to construct a senten ...
- CentOS7下安装soaplib
测试安装 cd ENV . bin/activate yum install libxml2-devel libxslt-devel pip install soaplib 安装中遇到的问题: Uni ...
- 76 binary_search 查找重复元素
[本文链接] http://www.cnblogs.com/hellogiser/p/binary-search-for-repeated-element.html [题目] 给定一个升序排列的自然数 ...
- Java计时器Timer和TimerTask用法
package com.sy.game.test; import java.util.Timer; import java.util.TimerTask; public class TimeTask ...
- c#excel的操作例子
class MyData//存储行数据 { public List<string> RowData { get; set; } } static void Main(string[] ar ...