Look at the object by rotating head

Step 0.

If you move the character's head according to the environment change, the game quality will increase. It feels like there is a better AI and more animations.
So we try bone rotation to see world actors.

Step 1.

Place NPC characters. You can substitute another class for testing.

Step 2.

Edit character blueprint.
Add a vector that named 'InterestingLocation'.
Add a function to find the nearest interesting location in the world space.

Step 3.

Find proper bone to use. We will use 'neck_01' here.

Step 4.

Edit AnimGraph.
Add a 'Transform bone' node. Set the value as shown in the screenshot below.

Step 5.

This is animation event graph.
Depending on character blueprint and bone rotation, 'Make Rot from Y' should be replaced with 'Make Rot from X' or something else.

The remaining issue...

- If you want smooth transition, you need to make more changes.
- It should be disabled depending on the situation.

Comments

Popular posts from this blog

Liquid material in a bottle

How to Make Circular Progress Bar(or Rounded Rectangle)

MatCap material