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
  • Vehicle First Steps
  • Motorcycle Parameters
  • Motorcycle Suspension
  • Result
  1. Game Development
  2. How to use Vehicle System

How to create a Motorcycle Controller

PreviousHow to create a Car ControllerNextVehicle Engine Sounds

Last updated 1 year ago

Vehicle First Steps

1- Place motorcycle model in the scene, set layer of car to Vehicle(8) and Unpack Prefab

2- Add Colliders and Rigidbody (set a high value for the mass of the vehicle, like 100)

3- Create Wheel Colliders for each wheel model

4- Add Motorcycle Controller component and assign wheel models and wheel colliders in same sequence:

5- Assign Steering Wheel

6- Set the Center of Mass

7- Create a vehicle enter trigger

8- Create and assign Inverse Kinematic Target Positions

The above steps are the same as the , see the for more details

Tip: if you place the center of mass at the height of the wheels and further back, as in the image above, you will get good results

Motorcycle Parameters

Motorbike physics has some unique parameters:

Wheels
Description

Max Steer Angle

The max wheel steer angle

Throttle intensity

Wheel acceleration influence by the engine.

Brake Intensity

The brake force intensity influence by the engine settings.

Wheel Collider

The wheel collider.

Wheel mesh

The wheel model.

Inclination
Description

Sensitive

The sensitive to start lean on curves.

Speed

The speed to lean the motorcycle in curves.

Max Angle

Maximum angle the motorcycle can lean in motion.

Stopped Inclination

The angle of the wheel when stopped, used to simulate the driver's feet on ground.

On Grounded Drag

Motorcycle drag when on ground.

Off Ground Drag

Motorcycle drag when not grounded.

Loop
Description

Enable Looping

Enable loop system

Loop Tag

Loop tag.

⚠ when the bike passes through an object with this tag the motorcycle lean system will be turned off to complete the loop correctly

Align With Loop Speed

The speed to align the Up with the loop normal.

Motorcycle Suspension

Up to this point the bike will be working normally, however it is interesting to use a suspension script:

Result

is the same for any vehicle.

🎮
car setup
page
Overturn Check