Import of FPS project resources and recording of animation realization-Unity notes (2021.1.20)

What we achieved today:

Insert picture description here
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)

Insert picture description here
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.

Insert picture description here
Try to do a handle control


Guess you like

Origin blog.csdn.net/qq_37856544/article/details/112881858