Unreal教学(12)——增加玩家的能力(Enhancing Player Abilities)

来源:互联网 发布:sql 最近7天记录 编辑:程序博客网 时间:2024/06/06 08:23

这篇文章中我们将修改First Person Shooter模板,让它看起来更加的复杂。我们将深入了解蓝图。

将要讲述下面这些内容

Player inputs and controls

Field of view

Timelines and branching logic

Adding sounds and particle effects to an object interaction


1. 可以先点开看它有哪些使用的模板蓝图。

这里有三个,前面两个作用好像基本上是一样的,不大懂stick input是什么意思,把这三个蓝图贴出来。

左右上下旋转。

这两个作用好像一样的,也是左右上下旋转。

上面这个是实现跳跃的动作。

可以通过edit进入游戏的编辑界面,下面就是进入的这个界面上来指定input操作,这里有些模板已经自带的操作。

这里需要讲到Action Mapping 和Axis Mapping的区别

Action Mapping是触发的动作,时间很短,Axis Mapping是连续的动作,可以看下面的英文说明。

Action Mappings is for key press and mouse click events that trigger player actions. Axis Mappings is meant for mapping player movements and events that have a range, such as the W key and S key both affecting the Move Forward action, but on different ends of the range.

这里我们需要增加 Sprint和Zoom两种动作到玩家身上。

新增加的两个动作

上面少写了一个n,

感觉速度增加不明显,但是具体体会的话还是有速度的增加的,下面是蓝图


2. 支持的放大镜功能。

有一个fov变量很重要,就是类似于opengl perspective函数中的fov函数,具有拉大和缩小的作用。

A core element of modern First-Person Shooters is a variables FOV (also known as filed of view) in the form of a player's ability to look down the scope of a gun to get a closer view of a target.


3. 使用timeline平移化变换的过程。

这个timeliness还挺好用的,功能实现起来不错,通过鼠标邮件进行缩放视角的缩放工作。

下面是它的blueprint图,和设置的图形,设置了好久菜知道怎么操作。perface!!!


调整的曲线图。

就能自动缩放场景。


4. 给击中的物体增加爆炸效果,比如击中两次会怎么样。

这个线连起来好乱,但是效果是有的。


又是一个不小的进步。可以用下面的语言描述:

Extend the comment box around the entire Event Hit sequence of nodes, and update the text to describe what the new sequence accomplishes. I chose When hit, turn red and set to primed. If already primed, destory self. The final result of the chain of Blueprints should look something like what is shown in the following screen shoot.

加油。





阅读全文
0 0
原创粉丝点击