I’m working on a first-person game that uses DOOM style controls, where you cannot look up or down. As part of this, the player will never need to move at all on the Y axis, but I still want the player to collide with walls.
As it takes place entirely in first person I would rather have a “capsule collider” style of collision, where they can smoothly fall off of tables and such, without ever-changing on the Y-axis.
What is the best way of achieving such type of character where they can collide with walls, but stay on the same axis?
For a first person game similar to DOOM, you probably won’t need any type of collision body. You can store the position in a single vector and whenever moving it, make sure it doesn’t hit a wall.
I mean that the Player is a single part that stays consistently on the same Y axis, which is set to zero. Meaning if the Player somehow got out of bounds they would stay floating, and since it’s a DOOM style game it means the camera will not move up or down either.
Been a while since I played doom, can’t you jump? Why not just use the physics engine provided?
That said, and regardless. Your question is best way to make a capsule collider.
I’d use blender, create a capsule mesh. Export to fbx. Import to Roblox. Use mesh with colliders enabled.
When player joins, weld said part to humanoid root part, disable other colliders in player (or just use a collision index that ignores the players limbs)
This is all theory but should point you in the right direction.