2022-09-08
6334
#unity
Marian Pekár
130548
Sep 8, 2022 ⋅ 22 min read

Building a third-person controller in Unity with the new input system

Marian Pekár I'm a programmer by heart and soul. Today, I'm fluent in C#, C++, and JavaScript, and I love making games. I work full-time as a programmer in Bohemia Interactive studio, in my spare time I write blog posts, occasionally create a game on a game jam, and constantly learn to be a better developer.

Recent posts:

how to use the ternary operator in javascript

How to use the ternary operator in JavaScript

Add to your JavaScript knowledge of shortcuts by mastering the ternary operator, so you can write cleaner code that your fellow developers will love.

Chizaram Ken
Feb 21, 2025 ⋅ 7 min read
Using tsup To Bundle Your TypeScript Package

Using tsup to bundle your TypeScript package

Learn how to efficiently bundle your TypeScript package with tsup. This guide covers setup, custom output extensions, and best practices for optimized, production-ready builds.

Muhammad Ali
Feb 20, 2025 ⋅ 7 min read
how to use react higher order components

How to use React higher-order components

Learn the fundamentals of React’s high-order components and play with some code samples to help you understand how it works.

Hussain Arif
Feb 20, 2025 ⋅ 10 min read
dependency inversion principle

Understanding the dependency inversion principle (DIP)

Learn about the dependency inversion principle (DIP), its importance, and how to implement it across multiple programming languages.

Samuel Olusola
Feb 20, 2025 ⋅ 8 min read
View all posts

9 Replies to "Building a third-person controller in Unity with the new input system"

  1. I have the problem that Unity doesn’t recognize the Controls.IPlayerActionsn / Controls.
    It is recognizing the normal UnityEngine.InputSystem and I made sure I included that package in VS Code. Any ideas? 😀

    1. Fixed the problem in case anyone runs into the same, here is the solution:
      check the generate c# class in the inspector 😉

  2. After implementing all the code and going trough the article multiple times, the movement works but it doesn’t play any animations.

  3. Hi Marian, thanks for the great tutorial, it seems to work nicely for me.
    I’m having an issue where moving sideways causes the camera to rotate a bit, i.e. if I walk left without manually moving the camera, it will turn enough that eventually the character will walk in a full circle.
    Do you have any ideas how I can fix this?

    Cheers,
    Elric

    1. Hey Elric,
      Did you figure out how to stop this? I can see what is happening with the camera but I cannot figure out how to fix it.
      Cheers,
      Brandon

      1. You need to go to the cinemachine camera and find the setting Orbits > Binding Mode and set it to World Space instead of Simple Follow with world up.

  4. I can’t find Cinemachine collider in my project. I’ve done all steps before it. Is it suppose to show up on Add Component?

  5. @Yujin, even though it says component above, it´s actually an extension. You´ll find it in a dropdown menu of the CinemachineFreeLook component at the very button.

  6. Character floats on play. The isGrounded check fails so it plays the Fall Animation (check in MoveState). Character is standing on a plane with a mesh collider! Any thoughts? thank you.

Leave a Reply