filmov
tv
Unreal Engine 4 - True First/Third-Person Character [Tutorial + Download]

Показать описание
Hey. In this quick tutorial, I am going to teach you how to create a True First Person Character using Unreal Engine 4. The character will lean properly to follow the players' camera movements, as well as playing proper turn animations.
This works well for First-Person and Third-Person games
Like if you enjoyed! Subscribe for more!
Ask me anything in the comments.
0:00 Introduction
0:46 Start with third person character template
1:03 Move and adjust the camera in the character
1:56 Demonstration of issue of seeing into your own body
2:05 Edit the animation blueprint, get control rotation
2:21 Create function GetLookRotation and set inputs and outputs
2:48 Transform the look target roration to match the coordinate system of the default character
3:11 Interpolate the head rotation towards the control rotation and use it as output
3:42 Call the function and actually update the value of the head rotation variable
4:00 Apply the value of the head rotation variable to the bones in the animation graph
4:45 Demonstration of issue of upper body being shown in weird direction and bend unnaturally
4:50 Reduce the rotation of the spines and neck to 15% and the head to 40% (sums up to 100% for the head)
5:23 Demonstration of more natural bending but still in a weird direction (in the preview)
5:26 Set default value for head rotation variable to fix the direction in the preview
5:33 Demonstration: No more looking into own body, but issue that player is not turning with the camera and the camera snaps to the other side
5:48 Choose and download turn animations from mixamo
6:46 Import animations
7:46 Setup downloaded skeleton for retargeting
8:31 Setup the unreal default mannequin skeleton for retargeting
8:39 ADDITIONAL STEP NEEDED (not in video): Your skeleton probably lacks a preview mesh which is needed for retargeting. Add them for the new (and if needed the old) skeleton:
* Open skeleton asset
* Click preview mesh
* Click on a mesh. The message will appear and the bottom right: “This mesh is set temporarily…”
* Click apply under the message
* Save skeleton
8:39 Retarget
8:51 Move character down if it is floating using a key for the pelvis
9:06 Add animation states for turning
9:30 Add boolean variables to control the transitions
9:45 Transition back to idle if one animation cycle is done or if the character is moving
10:11 Activate the turning animation by setting the new turn transition control variables if camera looks more than 90° to left or right
11:06 Rotate the character and let the animation play for one second, then set turn variables back to false to transition back to idle
11:24 Add notifications near the end of the turning animations
11:44 On notification set the turn transition control variables back to false to transition back to idle
12:02 Demonstration that the character is turning with the camera and the turning animation is played
12:23 Limitation
This works well for First-Person and Third-Person games
Like if you enjoyed! Subscribe for more!
Ask me anything in the comments.
0:00 Introduction
0:46 Start with third person character template
1:03 Move and adjust the camera in the character
1:56 Demonstration of issue of seeing into your own body
2:05 Edit the animation blueprint, get control rotation
2:21 Create function GetLookRotation and set inputs and outputs
2:48 Transform the look target roration to match the coordinate system of the default character
3:11 Interpolate the head rotation towards the control rotation and use it as output
3:42 Call the function and actually update the value of the head rotation variable
4:00 Apply the value of the head rotation variable to the bones in the animation graph
4:45 Demonstration of issue of upper body being shown in weird direction and bend unnaturally
4:50 Reduce the rotation of the spines and neck to 15% and the head to 40% (sums up to 100% for the head)
5:23 Demonstration of more natural bending but still in a weird direction (in the preview)
5:26 Set default value for head rotation variable to fix the direction in the preview
5:33 Demonstration: No more looking into own body, but issue that player is not turning with the camera and the camera snaps to the other side
5:48 Choose and download turn animations from mixamo
6:46 Import animations
7:46 Setup downloaded skeleton for retargeting
8:31 Setup the unreal default mannequin skeleton for retargeting
8:39 ADDITIONAL STEP NEEDED (not in video): Your skeleton probably lacks a preview mesh which is needed for retargeting. Add them for the new (and if needed the old) skeleton:
* Open skeleton asset
* Click preview mesh
* Click on a mesh. The message will appear and the bottom right: “This mesh is set temporarily…”
* Click apply under the message
* Save skeleton
8:39 Retarget
8:51 Move character down if it is floating using a key for the pelvis
9:06 Add animation states for turning
9:30 Add boolean variables to control the transitions
9:45 Transition back to idle if one animation cycle is done or if the character is moving
10:11 Activate the turning animation by setting the new turn transition control variables if camera looks more than 90° to left or right
11:06 Rotate the character and let the animation play for one second, then set turn variables back to false to transition back to idle
11:24 Add notifications near the end of the turning animations
11:44 On notification set the turn transition control variables back to false to transition back to idle
12:02 Demonstration that the character is turning with the camera and the turning animation is played
12:23 Limitation
Комментарии