Categories
Advanced and Experimental 3D computer Animation Techniques Project 2

Week 2 Write character blue print in Unreal engine

This week, I mainly worked on setting up the character blueprint, including:

  • Character capsule setup and camera setup
  • Character state machine setup (idle, walk, run)
  • Implemented camera rotation control using mouse movement
  • Added shift key input to trigger the running state and linked it to the state machine, enabling communication between the character blueprint and the animation blueprint
  • Added weapon drag effect (weapon swings slightly caused by camera movement)
  • Added character detail lighting (I wanted to create a warm light to simulate a body-attached light source, combined with a cold light for contrast)
  • Effect testing

Before getting started, I will provide all the assets I used and the link to the tutorial I followed. Since the tutorial I found is from the Chinese platform Bilibili, I won’t be able to share a YouTube link for the video resource.

Assets used:

1.Environment:

Dark fantasy greatsword pack | Unreal Engine 5 + UNITY – Naked Singularity Studiohttps://www.youtube.com/watch?v=_xR6SHgfhPU

2. Morbid Pack

Morbid Pack Volume 1 – https://www.fab.com/listings/8b88ac2e-9b50-4381-91d1-46683a89178b

3. Serpent Model I Created in Last Semester — Collaboration Units
(Full process: modeling, UVs, texturing, rigging)

4. Gargoyle Model I Created in Last Semester — Collaboration Units
(Full process: modeling, UVs, texturing, rigging)

5. Tutorial:

The course is taught by the creator of the game “Deathly Stillness”, which is available on Steam. Through the course, I learned how to create character and enemy blueprints, The character and zombie asset packs (including skeletal meshes, animation assets, and audio assets) were provided as part of the course and used for practice.

https://www.bilibili.com/cheese/play/ss32685?csource=Share_copylink&from_spmid=333.873.selfDef.purchased_lecture&plat_id=362&share_from=lesson&share_medium=iphone&share_plat=ios&share_session_id=B94F4E1E-BB07-40B1-83E1-A53774E26305&share_source=COPY&share_tag=s_i&spmid=united.player-video-detail.0.0&timestamp=1747402290&unique_k=528infI

Character capsule setup and camera setup

At the beginning, I set up the Animation Blueprint, Character Blueprint, and Blend Space for the character.

When I started setting up my character, the first step was to create a Character Blueprint. Inside the blueprint, I added the character mesh and carefully adjusted its position so it sat correctly within the capsule collider. This ensures that the character’s mesh and collision boundaries are properly aligned, which is really important for smooth movement and interaction.

I applied the same process for setting up the camera. I attached the camera to the character blueprint and positioned it in a way that works well with the gameplay perspective I want to achieve.

These might seem like basic steps, but getting them right early on saves a lot of trouble later in the pipeline—especially when starting to work with the animation blueprint and player controls.

Since the screenshots were taken later in the process, they include some updates like the arm texture and a few event icon features I added along the way.

Character state machine setup (idle, walk, run)

Inside the Animation Blueprint, I set up the State Machine, including Idle, Walk, and Run states.

Idle
Move

In the Blend Space, I blended the Idle, Walk, and Run animations, and set up the corresponding movement speeds.

For example, I set the walking speed to 300 and running speed to 750. Since my scene is quite large, I needed the character to move a bit faster to fit the scene.

Implemented camera rotation control using mouse movement

在角色蓝图的文件夹中,我增加了输入的文件夹,并加入了鼠标可以控制角色摄像机视野旋转的input action:

I also changed the bool input to Axis 2D, since the mouse controls the camera rotation based on X and Y movement on the screen plane. Using a bool would only allow simple on/off states, while Axis 2D lets me read continuous input values, which is more suitable for smooth camera control.

I used the Input Mapping Context to organize all the input settings and define the input devices, making the control setup more clean and modular.

I added a Look event in the event graph to call IA_look

Added shift key input to trigger the running state and linked it to the state machine, enabling communication between the character blueprint and the animation blueprint

In IA_run, I used a bool because it’s a simple on/off check—whether the key is pressed or not.

Similarly, I set up the Shift key input within the Input Mapping Context.

I added an if-run boolean check in the running graph. Then, I created a speed calculation function that uses this boolean—if the character is running, it sets the speed to 750, otherwise to 300.

Added character detail lighting (I wanted to create a warm light to simulate a body-attached light source, combined with a cold light for contrast)

This was my first attempt at adding a warm light attached to the character, so I added a point light inside the capsule.

Later during testing, I adjusted the light settings and created a toggleable flashlight-like feature for illumination.

IA_open_light
Open light function
I added this feature in the later stage, so I recorded it using the current version of the project files.

Leave a Reply

Your email address will not be published. Required fields are marked *