1. 新建一个First Person的模板工程,
命名为BlueprintScripting.
2. Viewport
点击play完成之后,可以进入到射击的场景中,
通过按住鼠标左键,前后移动鼠标的话,相机会前后移动。
按住鼠标右键,前后拖动鼠标的话,相机会旋转。
按住鼠标的中间键或者左右键同时按,前后移动,相机则会上下移动。
按住左键或者右键相机会左右旋转,按住中间的键相机会左右移动。
以上就是Level Editor中的viewport操作。
3. 放置物体
最常用的对象是actor.
英文描述
An actor is a basic object with no inherent behavior other than the ability to be rotated, moved and scaled, but it can be expanded to include more complex behavior by attaching components.
这里的actor和components之前都有介绍,说到actor就是一个没有自己的属性,只能够旋转移动和缩放的物体,但是它可以通过添加其它的component来拓展它的功能。
我们的目标是创建一个射中之后会变换颜色的物体。
我们需要改变actor's的材料,材料的解释
A material is an asset that can be added to an actor's mesh (which defines the physical shape of the actor) to create its look.
mesh是指actor的物理形状,material可以理解成皮肤之类的东西。
所以改变物体颜色的一种方式是直接使用不同颜色的材料代替之前的材料。
4. 暂且材料用皮肤代替