JU TPS Documentation
  • 🤩Welcome to JU TPS
  • 😄Quick Start
    • How to start a new scene
    • How to create a JU Character / Reskin Default Character / Setup New Characters
      • Ragdoll
      • Damageable Body
      • Physical Damage
      • Body Leaning Setup
      • Taking Damage / Healing
      • Footstep System
      • Resizable Capsule Collider
    • 📦 Addon Installer
  • 🎮Game Development
    • Game Styles
      • Third Person Shooter Style
      • First Person Shooter Style
      • Top Down Style
      • 2.5D Sidescroller Style
      • ⚠️Important Info About Cross-Plataform
    • Controls / Inputs
      • JU Input Manager
      • Input Events
    • How to create a Mobile Game with JU TPS
      • Mobile Inputs
    • How to load scene
      • Scene Controller
    • How to use Cover System
    • How to use inventory and add items
      • Inventory in UI
      • How to switch between items
      • How to align weapon rotation
    • How to create weapons and items
      • Prevent gun clipping through walls
      • Creating Projectiles/Bullets
    • How to use Dual Wielding System
    • How to use Armor/Cloth System
    • How to use Vehicle System
      • Standard Vehicle Configuration
      • How to create a Car Controller
      • How to create a Motorcycle Controller
      • Vehicle Engine Sounds
      • Coding Custom Wheeled Vehicles
      • How to enter and exit from a vehicle
    • How to use Gravity Switching
    • How to use Actions/Skill and Animation Events
      • JU TPS State Machine Behaviours
      • JUTPSActions Lib Scripting Reference
    • Camera State Trigger
    • How to use Enemies AI
    • How to use Vehicles AI
  • ⚙️Tools, Utils and Tutorials
    • General Tutorials
      • How to do Ragdoll Fall with Input Event
      • How to disable FPS Aim Mode / Scope / Iron Sight Aim
    • Auto Scripts
    • Icon Generator Tool
    • Destructible Objects System
      • Fracture Generator Tool
    • Pixel Quality Scaler
    • Camera Shake
    • Slow Motion
    • Gizmo Drawer
  • ▶️Video Tutorials
    • How to use JU TPS
  • 💬Discord Community
  • ❓Support | Help
  • 📍Roadmap
  • 🔃Change Log
  • 📦Official Addons
Powered by GitBook
On this page
  • First steps with Cover System
  • Configuring JU Cover Controller
  • Cover Trigger
  1. Game Development

How to use Cover System

PreviousScene ControllerNextHow to use inventory and add items

Last updated 1 year ago

The Cover System works very simply, it only needs two scripts, the JU Cover Controller which is added to the player character and the Cover Trigger which is added to a trigger close to a wall to create a cover area.

At the moment the Cover System only works natively for the Player, but in the future I will adapt it for AIs

First steps with Cover System

  1. Add a JU Cover Controller to your player

  1. Create a Cover Trigger

  1. Play a little

Tip

Configuring JU Cover Controller

The JU Cover Controller has several interesting parameters to better adapt to your game's style, It already works plug and play but you might like to change some parameters:

Parameters
Description

Cover Trigger tag

Tag to detect Cover trigger box

Current Cover Trigger

Cover trigger currently detected

Enable Cover

Enable Cover

Auto Mode

Causes the Cover System to start automatically without needing to press a button, based on movement and angle to the wall, when deactivated the Cover System will use the interaction button (F) to start

Sneak Speed

Movement speed in Cover

Rotation Speed

Rotation speed to Cover

Crouched Sneak Speed

Crouched movement speed in Cover

Corner Position Offset

It is the character's adjustment position on a corner when in Fire Mode

Wall Offset Position

Distance of the wall(or the center of the Cover Trigger)

Wall Offset Position in FireMode

Distance of the wall(or the center of the Cover Trigger) when in Fire Mode, It is useful for a better position pointing a weapon

Cover Animator Parameter

It is the name of the parameter in the Animator Controller

Camera Right Offset

Camera position ajustment on Right/Horizontal Axis when in Cover, this parameter works for right and left adjustment

Switch Side Speed

Camera position adjustment transition speed

Spine Inclination

Spine bone lean when in Cover, this parameter works for right and left adjustment

Left Weapon Inclination Intensity

Right Weapon Inclination Intensity

Left angle adjustment of the Item Aim Rotation Pivot when in Fire Mode and Cover

Lean Axis

🔴 It is the spine inclination axis, the default is the front axis (0,0,1) but you may have to change the axis due to your character's rig, you can test and see which works best on your character

Fire Mode Duration In Cover

Customized Fire Mode duration for the Cover System, it is useful if you want the character to cover faster so as not to take damage

On Cover / On Exit Cover

These are events called in these situations, these events are useful if you want to call any methods

Cover Trigger

The Cover Trigger is actually a very simple script, it basically serves for the JU Cover Controller to receive essential information from the trigger in a practical way.

The Cover Trigger has only one variable, which is used to inform the JU Cover Controller that the cover is only possible by crouching.

There is already a function for creating Cover Triggers as you saw above, but if you want to create one manually, a Cover Trigger requires the settings marked in red below:

you can use to improve the cover experience preventing the weapon from clipping through walls.

Left angle adjustment of the when in Fire Mode and Cover

🎮
Prevent Gun Clipping Script
Item Aim Rotation Pivot