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:

master state management hydration Nuxt usestate

Nuxt state management and hydration with useState

useState can effectively replace ref in many scenarios and prevent Nuxt hydration mismatches that can lead to unexpected behavior and errors.

Yan Sun
Jan 20, 2025 ⋅ 8 min read
React Native List Components: FlashList, FlatList, And More

React Native list components: FlashList, FlatList, and more

Explore the evolution of list components in React Native, from `ScrollView`, `FlatList`, `SectionList`, to the recent `FlashList`.

Chimezie Innocent
Jan 16, 2025 ⋅ 4 min read
Building An AI Agent For Your Frontend Project

Building an AI agent for your frontend project

Explore the benefits of building your own AI agent from scratch using Langbase, BaseUI, and Open AI, in a demo Next.js project.

Ivaylo Gerchev
Jan 15, 2025 ⋅ 12 min read
building UI sixty seconds shadcn framer ai

Building a UI in 60 seconds with Shadcn and Framer AI

Demand for faster UI development is skyrocketing. Explore how to use Shadcn and Framer AI to quickly create UI components.

Peter Aideloje
Jan 14, 2025 ⋅ 6 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