6.5 KiB
Quick Start Guide
Get up and running with EasyBallistics in under 10 minutes! This guide will walk you through creating your first ballistic weapon system.
🎯 New Gun-Centric Approach Available!
This guide shows the component-based approach using individual barrel components. For a complete weapon system with magazines, fire modes, and realistic gun mechanics, see the Gun Blueprint Creation Guide.
Overview
In this quick start, you'll:
- Create bullet properties
- Set up a material response map
- Create a simple weapon
- Test ballistic impacts
Step 1: Create Bullet Properties
First, let's define the characteristics of our projectile.
Create the Asset
- In the Content Browser, right-click → Ballistics → Bullet Properties
- Name it
BP_556_NATO_Properties - Double-click to open the editor
Configure Properties
Set these values for a 5.56x45mm NATO round:
Bullet Properties:
Grain Weight: 55.0
Diameter Inches: 0.224
Length Inches: 0.825
Bullet Type: Full Metal Jacket
Bullet Material: Copper Jacket
Ballistics:
Ballistic Coefficient G1: 0.151
Ballistic Coefficient G7: 0.076
Use G7 Model: false
Penetration:
Bullet Hardness: 15.0
Penetration Energy Threshold: 58.0
Expansion Velocity Threshold: 1800.0
Step 2: Set Up Physical Materials
Configure materials that bullets will interact with.
Create Steel Material
- Content Browser → right-click → Physics → Physical Material
- Name it
PM_Steel - Open the material editor
- In the Ballistics section:
- Click Create New to generate ballistic properties
- The system will auto-configure steel properties
Create Wood Material
- Create another Physical Material:
PM_Wood - In the Ballistics section:
- Click Create New
- The system will detect "wood" in the name and configure accordingly
Step 3: Create Material Response Map
Define how bullets interact with different materials.
Create the Asset
- Content Browser → right-click → Ballistics → Material Response Map
- Name it
MRM_Default - Open the editor
Configure Responses
Add entries for your materials:
Steel (PM_Steel):
Penetration Depth Multiplier: 0.3
Ricochet Probability Multiplier: 2.0
Ricochet Restitution: 0.8
Never Penetrate: false
Never Ricochet: false
Wood (PM_Wood):
Penetration Depth Multiplier: 2.0
Ricochet Probability Multiplier: 0.1
Ricochet Restitution: 0.2
Never Penetrate: false
Never Ricochet: false
Step 4: Create a Simple Weapon
Now let's create a weapon that fires ballistic projectiles.
Create Weapon Blueprint
- Create Actor Blueprint:
BP_SimpleRifle - Add a Static Mesh Component for the weapon model
- Add an EB Barrel Component
Configure the Barrel
Select the EB Barrel component and set:
Ammunition:
Bullet Class: EBBullet (from dropdown)
Bullet Properties Asset: BP_556_NATO_Properties
Material Response Map: MRM_Default
Ballistics:
Muzzle Velocity Min: 3100
Muzzle Velocity Max: 3200
Use Mathematical Physics: true
Use New Impact System: true
Fire Mode:
Fire Mode: Semiauto
Rounds Per Minute: 600
Add Firing Logic
In the Event Graph, add this simple firing setup:
// On Input Action Fire (or your input event)
Event InputAction Fire
↓
Branch (Can Fire?)
↓ True
Call Function: Fire Single Shot
↓
Set Timer by Function Name
- Function Name: "Reset Fire Cooldown"
- Time: 0.1 (for 600 RPM)
Step 5: Set Up Target Objects
Create objects to shoot at with proper materials.
Create Target Blueprint
- Create Actor Blueprint:
BP_Target - Add Static Mesh Component (use a cube or custom model)
- Set the Physical Material to either
PM_SteelorPM_Wood - Enable Collision and Simulate Physics
Add Impact Response
Add an EB Ballistic Impact Component to the target:
// In the target's Event Graph
OnBallisticImpact
↓
Branch (Did Penetrate?)
↓ True: Spawn Penetration Effect
↓ False: Spawn Impact Effect
OnBallisticRicochet
↓
Spawn Ricochet Effect
↓
Play Ricochet Sound
Step 6: Test the System
Time to see your ballistic system in action!
Testing Setup
- Place
BP_SimpleRiflein your level - Place several
BP_Targetactors with different materials - Set up a Player Controller or Pawn to control the weapon
- Play the level
What to Look For
- Penetration: Bullets should penetrate wood more easily than steel
- Ricochet: Bullets should ricochet off steel at shallow angles
- Material Response: Different materials should show different impact behaviors
- Physics: Targets should receive impulse and move when hit
Debug Features
Enable these for testing:
Bullet Debug Options:
Debug Enabled: true
Debug Trail Time: 2.0
Debug Trail Color Fast: Green
Debug Trail Color Slow: Red
You'll see colored trails showing bullet paths!
Expected Results
After completing this setup, you should have:
✅ Realistic Ballistics: Bullets affected by gravity and air resistance
✅ Material Interactions: Different penetration/ricochet on steel vs wood
✅ Impact Events: Targets respond to bullet impacts
✅ Debug Visualization: Visible bullet trails for testing
Troubleshooting
Bullets Not Spawning
- Check that
Bullet Classis set toEBBullet - Verify
Bullet Properties Assetis assigned - Ensure the barrel component is properly configured
No Material Response
- Verify targets have Physical Materials assigned
- Check that materials are added to the Material Response Map
- Ensure
Use New Impact Systemis enabled
Poor Performance
- Enable Object Pooling in bullet settings
- Reduce Max Traces Per Step if needed
- Consider using Fixed Step simulation for consistency
Next Steps
Now that you have a basic system working:
- Core Concepts - Understand the system architecture
- API Reference - Detailed function documentation
- Troubleshooting - Common issues and solutions
Getting Help
- Join our Discord for real-time help
- Check the API Reference for detailed function documentation
- Browse the Troubleshooting Guide for common issues