Questions tagged [character-controller]
The character-controller tag has no summary.
54 questions
1
vote
1
answer
120
views
Decelerating player's momentum without changing direction
I'm adding deceleration to my player character, decreasing their velocity over time when the player releases the direction keys.
With the code below, at non-perfect angles, the character seems to re-...
0
votes
0
answers
59
views
Need help on delta-time to fix jittering issue with 2D player controller
I'm trying to create a 2D side-scrolling player controller like Terraria but I can't get the delta-time right. If I set my laptop's mode to battery saver mode, my character jitters (from DT jitters) ...
1
vote
2
answers
520
views
How do I implement the "collide and slide" algorithm in Unity?
I've recently been attempting (and failing) to create my own character controller for my 3D Unity game for around a week. I hate the Unity rigidbody physics system for making a character controller, ...
0
votes
1
answer
125
views
How to instantly stop when moving the character with AddForce?
I made character movement using AddForce. But I don't understand how to get the desired effect. I need that when I release a movement key (for example WASD) the ...
0
votes
0
answers
32
views
When connecting a Character Controller component to a character, it starts to rotate uncontrollably
When connecting a Character Controller component to the character in Unity, it starts to rotate uncontrollably. Without the Character Controller, everything works fine, but the character does not walk....
1
vote
0
answers
122
views
How to Prevent Character Controller Descent at Platform Edges When Using a Capsule Collider
CONTEXT: I am implementing a basic 3D character controller from scratch in Unity. For collisions, I do a capsule cast in the direction of the player velocity and use the collide and slide algorithm to ...
0
votes
1
answer
136
views
Character Controller isGrounded reports false when descending slopes
I encountered a problem in Unity related to the Character Controller, namely with checking whether the player is on the ground or not (isGrounded).
A player walking down a slope with a minimum angle ...
1
vote
2
answers
221
views
Why does my character not move together with the moving platform?
I have a game with a player controlled by a CharacterController.
I also have a MovingPlatform.
When the player lands on the moving platform, it becomes a child object of it, so that it should move ...
0
votes
0
answers
75
views
Inconsistent jump height when rotating character left or right
I am developing an endless runner mobile game, Similar to Subway Surfers. I make my player character rotate slightly left or right and then return to facing forward when sliding left or right. The ...
2
votes
2
answers
1k
views
Should a CharacterBody3D be the root of a character, or a child node?
I'm watching a tutorial on setting up a 3D player character in Godot, and at around 7:45, it shows CharacterBody3D as the root node.
I'm wondering if this is ...
0
votes
1
answer
89
views
In Unity, how can a regular RigidBody know if it collided with a CharacterController?
I have a Unity CharacterController, that can detect collisions using the following code:
...
0
votes
0
answers
50
views
Weird corkscrew rotation on my fps controller
I recently started work on a new game and was making a first person controller. However, this problem came up.
My problem
I played around with it and followed multiple tutorials, but none worked.
...
0
votes
0
answers
80
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?
...
4
votes
1
answer
1k
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
885
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
392
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
2k
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
105
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
155
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
191
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
432
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
158
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
81
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
398
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
1k
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
741
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
65
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
591
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
122
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
429
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
817
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
93
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
138
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
91
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
3
answers
3k
views
How to stop the slide on slopes?
I'm 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 ...
0
votes
1
answer
174
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
2k
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
564
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
2k
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
1k
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
253
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 ...
2
votes
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
134
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
55
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
105
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
977
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 ...