Physics Character Controller
Physics Character Controller is a feature-rich, highly customizable rigidbody based character controller super easy to pick up and use out of the box and / or customize
What is it?
Physics Character Controller is a powerful yet simple character controller based on the unity physics system without the need to use custom kinematics. The character can easily interact with the physical environment, move and push objects, slide on surfaces, climb, wall jump and so on...
How do I use it?
Simple: install the package, assign a ground layer to your floor and reference it in the CharacterController (and AnimatedController if you are using one) and you are ready to go! The package accommodates the user who wants a simple plug and play solution and also developers who want to add their own modifications on top of the existing code.
What's included?
The package contains:
- Player model and multiple obstacle meshes
- Humanoid animated model
- Prefab folder with all the "core" components
- 2 sample scenes that guides the user and allows them to experiment with the character controller and find the best parameters combination for their needs.
The package main features are:
- Basic character movement in third and first person
- Player can move the character and rotate the camera
- Player can perform jump, long jumps, wall climb, wall slide, crouch, climb and sprint
- Camera solution to avoid clipping with the objects in the scene
- Capsule based collision and simple interpolated movements
- Allows the player to walk on rubble and irregular terrain
- Allows the player to walk on smooth terrain with changing normals
- Allows the player to move up a slope within a certain angle limit
- Ground snapping so the player can stick to surfaces and slopes
- Allows the player to move on steps (within a certain height set by the player)
- Supports rigidbody interaction and allows the player to move and collide with rigidbodies
- Supports and ignores specific layers
- Contains prefab that simulate viscosity
- Contrains speedup and slowdown platforms
- Contains bounce platforms
- Contains moving platforms
- Contains rotating platforms that keep the player rotation locked
- Allows the player to climb ladders
» FAQ:
- Can the player collide with simple rigidbodies? Yes, differently from other character controllers, the player is simply a vanilla rigidbody so it can handle interaction with every physic object without having to attach scripts and complicate your project.
- Do I need to be a coder? No, the asset allows you to simply edit the controller to your need (check the documentation below to know the details). If you want to add new features a intermediate level of programming is required and of course I'm always available to assist you via email.
- How is the camera handled? With cinemachine, the project is setup so that there are 4 different cameras for mouse, controller, first person and third person. Regardless you can easily create your own solution.
- Can I use a humanoid character? Of course, you can use the controller to set animation parameters (isGrounded, isSliding,IsTouchingWall...etc)
Technical details
- PCC uses the new unity input system (and contains collapsed code if you want to use the old one). It's raccomended to install the new input system before importing the package
- PCC uses cinemachine but the package also works with custom camera solutions. It's raccomended to install cinemachine before importing the package