# 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](../tutorials/gun-blueprint-guide.md)**. ## Overview In this quick start, you'll: 1. Create bullet properties 2. Set up a material response map 3. Create a simple weapon 4. Test ballistic impacts ## Step 1: Create Bullet Properties First, let's define the characteristics of our projectile. ### Create the Asset 1. In the Content Browser, **right-click** → **Ballistics** → **Bullet Properties** 2. Name it `BP_556_NATO_Properties` 3. **Double-click** to open the editor ### Configure Properties Set these values for a 5.56x45mm NATO round: ```yaml 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 ``` ![Bullet Properties](https://placehold.co/800x600/2e8555/white?text=Bullet+Properties+Editor) ## Step 2: Set Up Physical Materials Configure materials that bullets will interact with. ### Create Steel Material 1. Content Browser → **right-click** → **Physics** → **Physical Material** 2. Name it `PM_Steel` 3. Open the material editor 4. In the **Ballistics** section: - Click **Create New** to generate ballistic properties - The system will auto-configure steel properties ### Create Wood Material 1. Create another Physical Material: `PM_Wood` 2. 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 1. Content Browser → **right-click** → **Ballistics** → **Material Response Map** 2. Name it `MRM_Default` 3. Open the editor ### Configure Responses Add entries for your materials: ```yaml 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 1. Create **Actor Blueprint**: `BP_SimpleRifle` 2. Add a **Static Mesh Component** for the weapon model 3. Add an **EB Barrel Component** ### Configure the Barrel Select the **EB Barrel** component and set: ```yaml 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: ```cpp // 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 1. Create **Actor Blueprint**: `BP_Target` 2. Add **Static Mesh Component** (use a cube or custom model) 3. Set the **Physical Material** to either `PM_Steel` or `PM_Wood` 4. Enable **Collision** and **Simulate Physics** ### Add Impact Response Add an **EB Ballistic Impact Component** to the target: ```cpp // 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 1. Place `BP_SimpleRifle` in your level 2. Place several `BP_Target` actors with different materials 3. Set up a **Player Controller** or **Pawn** to control the weapon 4. **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: ```yaml 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 Class` is set to `EBBullet` - Verify `Bullet Properties Asset` is 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 System` is 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: 1. [Core Concepts](../core-concepts/overview) - Understand the system architecture 2. [API Reference](../api/overview) - Detailed function documentation 3. [Troubleshooting](../troubleshooting) - Common issues and solutions ## Getting Help - Join our [Discord](https://discord.gg/easyballistics) for real-time help - Check the [API Reference](../api/overview) for detailed function documentation - Browse the [Troubleshooting Guide](../troubleshooting) for common issues