FPS ENGINE DOCUMENTATION
  • Welcome to FPS Engine!
  • BEFORE WE START
    • Early Considerations
    • List of Tutorials
    • List of Add-Ons & Compatible Packages
  • GETTING STARTED
    • 01. Basic set-up
    • 02. Roadmap
  • CONTENT
    • 03. Content
      • 03.1 CAMERA
        • MoveCamera
        • CameraFOVManager
      • 03.2 MOVEMENT
        • PlayerMovement
      • 03.3 PLAYER
        • PlayerStats
        • PlayerControl
        • PlayerMultipliers
        • PLAYER STATES
          • PlayerStates
          • PlayerBaseState
          • PlayerStateFactory
        • WEAPON STATES
          • WeaponStates
          • WeaponBaseState
          • WeaponStateFactory
        • Player Debugging
      • 03.4 WEAPONS
        • Weapon_SO
        • WeaponIdentification
        • WeaponController
        • Bullet
        • ATTACHMENTS
          • Attachment.cs
            • Barrel.cs
            • Flashlight.cs
            • Magazine.cs
            • Scope.cs
            • Stock.cs
            • Laser.cs
            • Grip.cs
          • AttachmentIdentifier_SO.cs
      • 03.5 PICK UP SYSTEM
        • InteractManager
        • Interactable
        • Item_SO
        • Identifiable
        • Pickeable
          • WeaponPickeable
          • BulletsPickeable
          • AttachmentPickeable
      • 03.6 ENEMIES
        • IDamageable
        • EnemyHealth
        • TrainingTarget
        • CIrcularTargetEnemy
        • Turret
        • TurretProjectile
      • 03.7 EFFECTS
        • CameraEffects
        • CamShake
        • CrouchTilt
        • JumpMotion
        • ProceduralShot
        • ProceduralShot_SO
        • WeaponEffects
        • WeaponSway
      • 03.8 UI
        • CowsinsButton
        • Crosshair
        • CrosshairShape
        • Hitmarker
        • UIController
        • UIEvents
        • RebindUI
      • 03.8 EXTRA
        • Checkpoint
        • Coin
        • Compass
        • CompassElement
        • Destructible
        • Crate
        • ExplosiveBarrel
        • PowerUp
        • DamageMultiplier
        • HealMultiplierPowerUp
        • Healthpack
        • DoorInteractable
        • Experience
        • GetGameInformation
        • HurtTrigger
        • JumpPad
        • Lootbox
        • PauseMenu
        • PointCapture
        • Trigger
        • DraggableButtonInSceneView
        • UTILITIES
          • DestroyMe
          • IgnoreCollision
          • LookAt
          • CowsinsUtilities
      • 03.09 MANAGERS
        • CoinManager
        • ExperienceManager
        • GameSettingsManager
        • InputManager
        • SoundManager
        • PoolManager
  • HOW TO USE
    • Getting Started: First Steps
    • Importing FPS Engine into URP / HDRP
    • Add a Player Controller
    • Adding New Weapons
    • Saving & Loading Presets
    • Changing Keybindings
    • Creating New Pickeables
    • Controllable & Not Controllable Player
    • Adding New Surfaces ( Grounds )
    • Working with Attachments
    • Modify Weapon and Camera Effects
    • Adding Custom Key Rebinds
    • Add breakable (Destructible) objects
    • Custom Shot Weapons
    • Switch FPS Engine´s Controller
    • Adding Enemies
    • Stairs & Slopes
  • FAQ
    • FAQ
  • SUPPORT
    • Support
Powered by GitBook
On this page
Export as PDF
  1. HOW TO USE

Stairs & Slopes

PreviousAdding EnemiesNextFAQ

Last updated 1 day ago

Availble for FPS Engine 1.3.8 or newer.

Stair support is a common feature in FPS games. While it may seem straightforward, it is often more complex than it appears. In fact, even many AAA titles don't handle stairs exactly the way you might expect. FPS Engine offers full stair support, allowing the player to smoothly move up stair-like surfaces. In the example below, the stair mesh is shown in black, and the collision, handled via a non-convex Mesh Collider, is shown in green. Since the two overlap, the visible result appears entirely green due to the collider.

FPS Engine allows the player to climb stair-like geometry smoothly, similar to how it's handled in some other games like Counter-Strike, for example. This system also helps prevent the player from getting stuck on curbs or small terrain inconsistencies, contributing to a more fluid and responsive controller feel.

While this approach is highly effective, it does require some additional setup and customization to ensure the controller behaves precisely as intended. FPS Engine is pre-configured by default so you do not need to worry about this.

  • maxStepHeight: Maximum allowed height for a step to be considered a climbable step.

  • maxStepDistance: Maximum Distance to detect a staircase or step.

  • stepUpHeight: How much the player moves vertically when going upstairs. Too low or high values may cause jittering and not smooth movement.

  • stepUpSpeed: Speed at which the player moves while on the stairs. Too low values may cause jittering, while too high values may feel like the player is moving too fast.

maxStepHeight & maxStepDistance are quite straightforward, but stepUpHeight & stepUpSpeed require more careful tuning, as incorrect values can lead to unnatural or jittery movement. Fortunately, FPS Engine comes with default values already tailored for realistic staircases, ensuring smooth and believable movement right out of the box.

One effective solution is to treat stairs as slopes. Many AAA games including titles like Overwatch use this approach, where stair geometry is visually represented as steps but functionally handled as a smooth incline. Here's an example:

As you can see, the stairs are visually stairs, but under the hood they are treated as slopes, giving you the best of both worlds: visual fidelity and smooth player movement.

FPS Engine provides full flexibility in making these kinds of game design decisions, allowing you to choose the solution that best fits your gameplay needs.