Physics Based Character Controller is a powerful yet simple character controller based on the unity physics system. The player 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, setup a camera (the package uses cinemachine but can work with custom cameras) and the input reader 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
Prefab folder with all the “core” components
A sample scene 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
If you have any questions, suggestions or feedback, please feel free to contact me at nappin.1bit@gmail.com
RuntimeNavMeshBuilder: Source mesh eyes does not allow read access. This will work in playmode in the editor but not in player
UnityEngine.AI.NavMeshSurface:BuildNavMesh()
NavMeshGenerator:Start() (at Assets/MyAssets/Scripts/NavMeshGenerator.cs:13)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.AI;
public class NavMeshGenerator : MonoBehaviour
{
public NavMeshSurface surface;
void Start()
{
surface.BuildNavMesh();
}
// Update is called once per frame
void Update()
{
// UpdateNAvmesh();
}
public void UpdateNAvmesh()
{
}
}
Hi! As far as I can tell the code you are showing is about the navmeshes and doesn’t have to do with the eyes mesh. The code is also not from the asset. What’s the issue specifically?
Hello, this asset is pretty much everything I need. However I am stumped on implementing a simple climbing mechanic similar to what you’d find in Breath of the Wild. Curious to know if anyone has any idea how you’d include something like that?
Hi, if you intend to implement a climb mechanic I suggest to use the “Ladder” script and mute the CharacterManager script when on a wall or tweak its gravity / drag values. I’m of course available if you need help with custom code!
Hi Migaroez! The asset works with cinemachine but supports all kinds of custom camera solutions. In the example scene I’ve setup a cinemachine that can indeed be copied in your own controller but also you can create another cinemachine camera solution and plug it in the controller.
If enough people ask for it, I’ll create a few cinemachine camera prefabs for those that want to use this setup. Tnx for the feedback!
Hey,
i’m tested the webgl demo from the asset and i noticed one thing: if you stand directly in front of a wall and press the jump button, the jump does not work. A bug?
Hi, I’ve purchased the asset a few months ago, but only got the chance to use it recently. Loving it so far!
Edit: I had a question regarding slopes, but it seems I didn’t notice I just had to check the Lock on slope box to get the result I wanted.
solved
What I’m trying to achieve is to have the character slow down when going up a slide, and speed up when going down.
I believe I have to tweak canSlideMultiplierCurve, and I got a moderate success in doing so, but I do have jittery movement, as both negative and positive values are applied during update.
Hi, Would this character controller be able to walk around a dynamic RigidBody platform? I saw in the documentation that it works but I’d have to freeze rotation and have the RigidBody controlled by the script. Would it be possible to have it work with a RigidBody that’s driven by physics (Like Wheel Colliders)?
hi, is this controlling a dynamic rigid body, so that physical interactions with other dynamic objects of different weights creates physically plausible results? Ie that lighter objects can be pushed more easily than heavier objects, and the player itself can be pushed by other moving entities? thanks!
Hey, is there any easy way to implement a custom gravity code I have for this player? i’m having a walkable planets with custom directions to the gravity type of project.