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 状态机 动画蓝图的更多相关文章

  1. Unreal Engine4 学习笔记2 动画蒙太奇

    动画蒙太奇出现的位置是在动画蓝图的动画图表和事件图表中,如下图 事件图表,可以看出在主线执行的结尾,如果is Punching 为true,则会执行一个我们自定义的Punch Event,用来播放动画 ...

  2. iOS学习笔记-自定义过渡动画

    代码地址如下:http://www.demodashi.com/demo/11678.html 这篇笔记翻译自raywenderlick网站的过渡动画的一篇文章,原文用的swift,由于考虑到swif ...

  3. jquery学习笔记(四):动画

    内容来自[汇智网]jquery学习课程 4.1 显示和隐藏 在jQuery中使用 hide() 和 show() 方法来隐藏和显示 HTML 元素: hide()的语法形式:$(selector).h ...

  4. jquery学习笔记-----事件和动画

    一.ready机制 $(document).ready( function(){} ) $().ready( function(){} ) $( function(){} )  jquery的read ...

  5. !!学习笔记:CSS3动画

    一句话就有css3动画: 2016-6-29 <style type="text/css"> h1{background:#999;} h1:hover{border- ...

  6. iOS学习笔记09-核心动画CoreAnimation

    http://www.cnblogs.com/liutingIOS/p/5368536.html 一.CALayer CALayer包含在QuartzCore框架中,具有跨平台性,在iOS中使用Cor ...

  7. Unity Shader学习笔记 - 用UV动画实现沙滩上的泡沫

    这个泡沫效果来自远古时代的Unity官方海岛Demo, 原效果直接复制3个材质球在js脚本中做UV动画偏移,这里尝试在shader中做动画并且一个pass中完成: // Upgrade NOTE: r ...

  8. CSS3学习笔记之loading动画

    效果截图: HTML代码: <div class="divBox"> <div class="loader"> <div clas ...

  9. IOS开发学习笔记022-imageView实现动画

    这里要播放的动画是很多张连续的动画,连续播放就会显示出动画效果. 大概过程是: 新建一个single view application ,然后添加一个image View控件到视图.给image vi ...

随机推荐

  1. zabbix安装报某些模块未安装上

    执行下 make clean /usr/local/php5/bin/phpize ./configure --with-curl --with-php-config=/usr/local/php5/ ...

  2. [mysql] Some non-transactional changed tables couldn't be rolled back

    使用peewee的事务时,碰到一个郁闷的问题,事务似乎无效! 于是简化了下模型,写了简单的测试代码,发现问题,如题所示. 找到解答: https://github.com/etianen/django ...

  3. 【GoLang】GoLang struct 使用

    代码示例: package main import "fmt" type Human struct { name string age int weight int } type ...

  4. springboot 连接池wait_timeout超时设置

    使用springboot 线程池连接MySQL时,mysql数据库wait_timeout 为8个小时,所以程序第二天发现报错,在url配置了 autoReconnect=true 也不行,查询配置以 ...

  5. Unity Assets目录下的特殊文件夹名称

    1.隐藏文件夹以.开头的文件夹会被Unity忽略.在这种文件夹中的资源不会被导入,脚本不会被编译.也不会出现在Project视图中.2.Standard Assets在这个文件夹中的脚本最先被编译.这 ...

  6. cairo-1.14.6 static compiler msys mingw32

    gtk2.x 静态编译时 需要注意的是 cairo cairo 1.14.x 使用了 mutex , 用动态方式时 DllMain 中调用了 CAIRO_MUTEX_INITIALIZE () 在静态 ...

  7. 6.SpringMVC注解启用

    SpringMVC注解可以帮助我们快速地注入 属性和参数 提高开发效率. 由于 有相当一部分人讨厌xml配置方式 注解可以覆盖 xml则不能 使用注解比xml规范化,因为很多注解都是java的规范的范 ...

  8. 跨浏览器的事件对象-------EventUtil 中的方法及用法

    什么是EventUti----封装好的事件对象 在JavaScript中,DOM0级.DOM2级与旧版本IE(8-)为对象添加事件的方法不同 为了以跨浏览器的方式处理事件,需要编写一段“通用代码”,即 ...

  9. .Net的DataGrid的使用

    先上图吧

  10. SlimDX.dll安装之后所在位置

    C:\Windows\Microsoft.NET\assembly\GAC_64\SlimDX\v4.0_4.0.13.43__b1b0c32fd1ffe4f9\SlimDX.dll