2.5D P1 Framework: Complete!

I completed the course with all challenges! Here’s a Final Update!

2.5D Phase 1 Framework Challenges

  • Ladder System
  • Player Roll Animation when hitting the left shift key
  • Idle Jump Animation
  • Cinemachine Camera Follow

Ladder System

Out of all of the challenges, the Ladder System managed to frustrate me quite a bit. I had to rework some bool logic that I had going in the player and player animation class. I ultimately decided to scratch off having the animation logic separate and instead went with what Jon had for the course.

The ladder system logic is similar to the Ledge Grabbing System I did prior so it wasn’t too bad. I at least had a direction to go forward.

It got messy when figuring out the condition settings in the Animator. I don’t know how many hours I spent on it trying to figure out how I broke another animation state. But in the end, I learned a lot! It was a well-needed experience.

Oh, and I grabbed animations for going up the ladder and getting off a ladder in Mixamo. It’s amazing what you can find there!

Player Roll Animation

After finishing the Ladder System, I came out with confidence in setting up the roll animation when sprinting. I download a roll animation from mixamo and transferred it over to Unity.

I added a bool to the player class to control the rolling logic. If the player is grounded and I hit the left shift, I want a coroutine to start that will control the logic behind the roll:

IEnumerator SprintRollRoutine()
{
if (_velocity != Vector3.zero)
{
_isRolling = true;
_animator.SetBool("isRolling", true);
_speed += _rollSpeed;
yield return new WaitForSeconds(_rollTime); _speed -= _rollSpeed;
_isRolling = false;
_animator.SetBool("isRolling", false);
}
}

if the velocity of the player is moving, I want to set _isRolling and the animator isRolling to true. I also want to set the _rollSpeed to add to _speed. It will give a boost of speed when rolling.

Then I yield for a second or two before setting the _speed back to normal. I want to set _isRolling and the animator isRolling back to false.

I had to play around with the _rollTime to find the right value for the speed and the duration of the roll animation.

Idle Jump Animation

The funny thing about this challenge is that I completed it when I implemented the sprint jump animation! The process to implement the animation is the same as the others. I just made sure I set the condition from Idle to Idle jump right as long as the velocity of the player is 0.

Cinemachine Camera Follow

I also implemented this challenge early on before starting the challenges. Not sure if you can tell through the previous GIF images, I’m using Cinemachine to follow the player. Cinemachine is a tool that is a must-have for camera work! It’s simple to set up and easy to use when you want to follow the player around using a virtual camera.

Thoughts And Conclusion

I learned a lot. A lot! A lot! I learned how to use the character controller and how I was able to detect hit points and hit normals. I learned how to create modular prefabs and moving platforms by using Vector3 move towards. I especially came out large learning how the animation system work in Unity!

It’s awesome to look back before I started this course and look where I am now… It excites me to know that I will be further ahead with knowledge in Unity when I complete the GameDevHQ program!

You can access the project on my GitHub here. Hopefully, you can find something useful in there or even better, give some advice on something you think I can improve on!

Gabriel

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store