What we achieved today:
Import the arm and gun model and animation resources, and apply the resources. (Resource is Low Poly FPS Pack-Free (Sample), free resource from assets store)
Regarding the animation, use a hybrid tree to make it, and use CharacterController.velocity to control the actual value of the parameter.
Effect: Self-made FPS mobile control demonstration
BUG and defects:
no
worth taking note of:
Vector3 temp_velocity = m_characterController.velocity;
temp_velocity.y = 0; //过滤掉跳跃带来的影响
m_velocity = temp_velocity.magnitude;
Note that when using characterController.velocity as the animation control parameter, the impact of jumping should be filtered out, and the y-axis should be set to 0.
m_characterAnimator.SetFloat("Velocity", m_velocity, 0.1f, Time.deltaTime);
Giving a damp parameter animation in SetFloat will transition more naturally.
Try to do a handle control