Questions tagged [character-controller]
The character-controller tag has no usage guidance.
42
questions
0
votes
0
answers
45
views
First person jump only works at certain angles
I'm making a basic 3D First Person project using the movement code below, but I can only jump at a certain angle.
How can I fix this so that my character can jump anywhere?
...
2
votes
1
answer
160
views
Character controller that can handle sloped terrain and boxy ledge traversal
I am working on a character controller for a 3D platformer in Unity. I cannot find an approach that satisfies me.
I have experimented with these approaches in order to learn about their virtues and ...
3
votes
1
answer
379
views
How are character controllers built upon complex gameplay systems?
I would like some industry advice. I feel like the starting part to every game I create is the character controller. My goal is to create a solid base character controller that I can expand upon for ...
0
votes
1
answer
85
views
The bottom of the player capsule collider is going into the ground box collider
The bottom part of the player capsule collider is going inside the ground collider. I am using a raycast for detecting whether the plauer is grounded; an object (sphere) that is present on the bottom ...
1
vote
1
answer
317
views
How to compare a vector to a rotation in Godot 4.1?
The Context
In Godot 4.1, I have a third-person character controller. It's a CharacterBody3D with a child Node3D called PlayerContent. The visual components of the character (model, etc.) are all ...
0
votes
1
answer
59
views
irregular physics using character controller
I recently made the switch to the unity built in character controller, as it better suited the needs of my project. However, after refactoring my code to work with the character controller I've ...
0
votes
2
answers
73
views
How to collide a circle against a pixel grid without getting snagged?
It's probably senseless to post my code because it simply takes a hard-stop approach when it encounters anything in the grid that is impassable (well, I've attempted to check -20/+20 deg, then -40/+40 ...
0
votes
0
answers
66
views
PhysX Skin Width
How a character controller's skin width is implemented?
I have a custom server with a traditional heightmap for terrains but when it comes to regions sitting on the terrain, I rely on 3D voxels that ...
0
votes
1
answer
235
views
Why is Physics.CapsuleCast returning a mix of true and false when it should return only true?
I'm making a simple character controller. Each frame the player moves by moveDistance units in the moveDir direction.
I'm ...
0
votes
0
answers
94
views
My character pops up instead of jumping correctly
Currently my character moves around like expected except the jump. Right now it jumps but it pops up instead of a proper jump, it jolts up, teleports up. the jump works, it just pops up.
...
0
votes
1
answer
42
views
My character keeps wanting to face the world z axis
My character is facing the direction its moving to, but when it stops moving, it rotates back to facing the world z axis.It rotates back to "how it was".
...
0
votes
1
answer
205
views
Detect collision occurring on a parent CharacterController from a child object
I'm creating an audio script for my character and it changes the sounds based on the textures it is walking on.
Said character uses a Character Controller component from Unity and I thought of using ...
0
votes
1
answer
584
views
What is ApplyBuiltinRootMotion and how to use it?
The character in my game has humanoid feature. I have unchecked "Apply Root Motion" in Animator component and use scripts for its movements. I want to implement a Ledge Grab Jumping movement....
0
votes
1
answer
377
views
How to allow a CharacterController to pass through walls?
I'm developing a game in which bot-controlled billboards pursue you.
If the bot gets stuck behind a wall for a while, not able to catch the player, I want the bot to pass through the wall.
I'm using a ...
0
votes
1
answer
41
views
Character Controller shows in scene but not in game
When I press play my character controller turns black, the scale on the z axis is 0 and all the children are not visible. Now the thing this only happens when I press play — if I don't, everything is ...
0
votes
1
answer
354
views
What's "isMatchingTarget" in Unity?
I came across this line of code below.
What the boolean "isMatchingTarget" is used for?
...
0
votes
0
answers
67
views
Alternative to CharacterController
I am really enjoying the use of charactercontroller, but it being limited by a y-axis aligned collider is a real annoying limitation when I am using a 'character' with a very different shape (like a ...
0
votes
1
answer
254
views
My First Person Player Capsule Is Always About 6 inches Under The Floor
Here is the problem. This is the exterior of the hallway in which my player capsule is standing. Notice the bottom of the capsule poking through the floor.
This is the interior of the hallway, notice ...
1
vote
1
answer
490
views
How to get/edit the script of the built-in "Character Controller" component?
I was using Unity's Character Controller component, but I found it very limited and wanted to tweak some things.
I thought about creating my own character controller from scratch, but it would be much ...
1
vote
0
answers
70
views
Character movement on irregular surface in Unity
I'm currently implementing a system in Unity where I generate an approximation of a blood cell and treat it as a planetoid, as if you're playing Super Mario Galaxy, and you're running around the ...
0
votes
1
answer
86
views
Determine when a character is stationary, and which direction they are facing
I'm currently trying to figure out two things for my character's movement and animation.
A better/faster way to track when movement stops than the IsSleeping method.
A way to track which direction my ...
1
vote
0
answers
44
views
Is treating object meshes as nav meshes a sensible strategy for grounding characters?
It bothers me that a lot of character controllers are written to rely on raycasting for movement along the ground. While this solution is very straightforward and general (especially in the sphere ...
0
votes
2
answers
2k
views
Unity - How to stop the slide on slopes?
struggling with a wee issue where if my character walks up a slope he slides back down when at rest, and bounces down when running down the slope. I've followed a few videos but none seem to address ...
0
votes
1
answer
128
views
All kinds of 2key controls
I want to find all possible ways to control a game using 2 keys on input.
1. Summarize the problem
I find a brand new game engine that has only two inputs but great potential! And the community of ...
0
votes
0
answers
1k
views
Character controller versus nav mesh agent for wandering?
I'm starting to work on the AI for my game, and one character will need to wander around aimlessly until one of its other states are triggered. With that, and after plenty of searching, I found a ...
0
votes
0
answers
1k
views
Box collider not colliding with Character controller
I have a player with a CharacterController attached. The player can move around.
There are obstacles which the player can collide with. These obstacles have a ...
0
votes
1
answer
2k
views
Stop 2D platformer character from sliding down slope
I'm making a 2D platformer game with the default Unity 2D physics. I am implementing slopes, but my player slips down the slope because of the physics.
Here is the code I use for the player movement:
...
0
votes
2
answers
2k
views
How do i easily clamp my cameras rotation when using transform.rotate()
I'm making a fps controller, and I'm trying to clamp my cameras x rotation. Here's my code so far:
...
0
votes
1
answer
426
views
Character controller falling with positive speed
I'm having very weird problems with my player's vertical movement. I'm using a Character Controller component with a capsule collider and no rigidbody. For testing purposes, I've ended reducing my ...
0
votes
1
answer
1k
views
Rotating fps rigid body on the Y axis
I'm currently attempting to make a first person character using a rigid body. I am aware that the character controller exists, but I believe my game will be very physics based so it's better if my ...
0
votes
1
answer
869
views
Momentum-wise accurate player controls in Unity regarding collisions
First post here. So I am a newbie to Unity and am willing to create a general character controller script to base my future characters. I understand a character's mechanics are pretty design (UX) ...
0
votes
1
answer
209
views
How can I have the character come back to its full height after crouching?
I'm making a simple game and when the player crouches/slides I would want to make the character to change size. However when it changes to its smaller size it doesn't go back to its original size ...
1
vote
1
answer
2k
views
Capsule getting stuck on edge of block
I'm making a first person game and when I jump and my character gets close to the top of the wall, the vertical movement stops, jitters, or suddenly snaps to the top of the wall.
Video
Here is my ...
1
vote
0
answers
86
views
Rotate the player in a certain way that makes it look like he is sliding
I'm trying to make my first game in Unity: a 3d platformer inspired by the classic Crash Bandicoot games.
I've managed to make most of the movement with the character control script below. However, I ...
0
votes
0
answers
36
views
Moving character controller on twisted track
I am trying to move a ball using Unity's character controller component. I want to move the ball along the twisted track so that it can go upside down.
Below is the video of the problem when moving ...
0
votes
1
answer
64
views
Buttons only trigger right/left movement once, not continually
I have a Unity mobile project where I am trying to use right/left movement using two UI buttons situated accordingly. The issue is that it only moves the player to the right/to the left one time, not ...
1
vote
1
answer
1k
views
Unity3d Rigidbody movement along slope slowdown
I have a Rigidbody character controller (Unity, C#) which I'm trying to make work seamlessly when walking on sloped ground. I've got it working fine walking up and down a slope by changing the forward ...
0
votes
1
answer
596
views
Implementing a Turn Radius for a Character
I'm working on a 3rd person platformer in Unity where I'm attempting to capture a Mario 64 style feel. Part of the game involves attaining really fast speeds. Currently, my turning code is pretty ...
0
votes
0
answers
79
views
Wall jump without returning to wall
In my 2D Platformer character controller that has both a wall jump and a double jump ability, how would I approach implementing a feature that stops the player from returning to the wall they ...
0
votes
1
answer
936
views
Detect a collision between a CharacterController and a 3D Object?
I am making an XR game, and I am stuck with a part. Does anyone know a function that would detect this?
OnCollisionEnter and ...
0
votes
1
answer
691
views
How can I reset the mouse axes when respawning a player?
I am making a simple parkour game in which the camera will follow the mouse based on the mouse input axis * the sensitivity. This works great, but when I want to reset my character to the start I cant ...
0
votes
1
answer
87
views
State Machine implementation issues
I have been working on a project for a while now, and i'm reaching the point where my character controller is starting to do more than just move/jump/crouch so I split the interaction stuff off into ...