Questions tagged [character-controller]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
33 views

How to move a Rigidbody forward using Bullet Physics

I'm currently developing a character controller for my game framework, and I'm utilizing the Bullet Physics engine for the physics simulation. In the process of adjusting the velocity, I aim to enable ...
Wagner Andreas's user avatar
0 votes
0 answers
31 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. ...
Donkey45's user avatar
0 votes
0 answers
46 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? ...
MarsDarklighter's user avatar
2 votes
1 answer
288 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 ...
DyingIsFun's user avatar
  • 1,307
3 votes
1 answer
445 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 ...
Jacob Edie's user avatar
0 votes
1 answer
155 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 ...
Sami Rehman's user avatar
1 vote
1 answer
799 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 ...
Legoman's user avatar
  • 163
0 votes
1 answer
61 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 ...
Jambo's user avatar
  • 11
0 votes
2 answers
84 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 ...
iPaul's user avatar
  • 1
0 votes
0 answers
92 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 ...
iPaul's user avatar
  • 1
0 votes
1 answer
285 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 ...
EEAH's user avatar
  • 113
0 votes
0 answers
105 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. ...
Solodobo's user avatar
0 votes
1 answer
50 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". ...
Solodobo's user avatar
0 votes
1 answer
245 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 ...
Astolfo's user avatar
0 votes
1 answer
851 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....
Achie1's user avatar
  • 169
0 votes
1 answer
478 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 ...
silver takana's user avatar
0 votes
1 answer
46 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 ...
Sajawal Hassan's user avatar
0 votes
1 answer
412 views

What's "isMatchingTarget" in Unity?

I came across this line of code below. What the boolean "isMatchingTarget" is used for? ...
Achie1's user avatar
  • 169
0 votes
0 answers
76 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 ...
Weckar E.'s user avatar
  • 822
0 votes
1 answer
302 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 ...
ChristianOConnor's user avatar
1 vote
1 answer
566 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 ...
Alexandre Marcati's user avatar
1 vote
0 answers
74 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 ...
John Altos's user avatar
0 votes
1 answer
90 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 ...
EvelynSays's user avatar
1 vote
0 answers
48 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 ...
smallobsession's user avatar
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 ...
Sam Law's user avatar
0 votes
1 answer
137 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 ...
rat's user avatar
  • 3
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 ...
Hazel へいぜる's user avatar
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 ...
Richard David's user avatar
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: ...
Santiago Padilla Zambrano's user avatar
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: ...
Millard's user avatar
  • 500
0 votes
1 answer
473 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 ...
correojon's user avatar
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 ...
Millard's user avatar
  • 500
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) ...
cbugk's user avatar
  • 103
0 votes
1 answer
218 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 ...
Felipe Schluepmann's Films's user avatar
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 ...
PWalkersCrisps's user avatar
1 vote
0 answers
95 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 ...
Felipe Schluepmann's Films's user avatar
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 ...
Naresh's user avatar
  • 129
0 votes
1 answer
75 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 ...
Samuel stankiewicz's user avatar
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 ...
Relativ9's user avatar
0 votes
1 answer
700 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 ...
lase's user avatar
  • 540
0 votes
0 answers
80 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 ...
Ben's user avatar
  • 487
0 votes
1 answer
1k 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 ...
OskarZyg's user avatar
0 votes
1 answer
741 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 ...
1234567890's user avatar
0 votes
1 answer
102 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 ...
Pheonix2105's user avatar