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:

Rxjs Adoption Guide: Overview, Examples, And Alternatives

RxJS adoption guide: Overview, examples, and alternatives

Get to know RxJS features, benefits, and more to help you understand what it is, how it works, and why you should use it.

Emmanuel Odioko
Jul 26, 2024 ⋅ 13 min read
Decoupling Monoliths Into Microservices With Feature Flags

Decoupling monoliths into microservices with feature flags

Explore how to effectively break down a monolithic application into microservices using feature flags and Flagsmith.

Kayode Adeniyi
Jul 25, 2024 ⋅ 10 min read
Lots of multi-colored blue and purplish rectangles.

Animating dialog and popover elements with CSS @starting-style

Native dialog and popover elements have their own well-defined roles in modern-day frontend web development. Dialog elements are known to […]

Rahul Chhodde
Jul 24, 2024 ⋅ 10 min read
Using Llama Index To Add Personal Data To Large Language Models

Using LlamaIndex to add personal data to LLMs

LlamaIndex provides tools for ingesting, processing, and implementing complex query workflows that combine data access with LLM prompting.

Ukeje Goodness
Jul 23, 2024 ⋅ 5 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