11 KiB
Troubleshooting Guide
Common issues and solutions for EasyBallistics.
Installation Issues
Plugin Not Appearing in Plugin Manager
Symptoms:
- EasyBallistics doesn't show up in Edit → Plugins
- No Ballistics category in asset creation menu
Solutions:
-
Check UE Version Compatibility
Required: Unreal Engine 5.6.0 or later Current: Check Help → About Unreal Editor -
Verify Plugin Location
Correct path: YourProject/Plugins/EasyBallistics/ Check for: EasyBallistics.uplugin file -
Regenerate Project Files
- Right-click your
.uprojectfile - Select "Generate Visual Studio project files"
- Restart Unreal Engine
- Right-click your
-
Clear Derived Data Cache
- Edit → Developer → Derived Data
- Click "Clear"
- Restart editor
Compilation Errors
Error: "Module 'EasyBallistics' could not be loaded"
// Add to YourProject.Build.cs
PublicDependencyModuleNames.AddRange(new string[] {
"Core",
"CoreUObject",
"Engine",
"EasyBallistics" // Add this line
});
Error: "Failed to import class 'EBBullet'"
- Ensure plugin is enabled
- Check that EasyBallistics.Build.cs exists
- Verify all source files are present
- Clean and rebuild project
Runtime Issues
Bullets Not Spawning
Symptoms:
- Fire input triggers but no bullets appear
- No muzzle flash or effects
Debugging Steps:
-
Check Barrel Configuration
// Verify these are set: BulletClass = AEBBullet::StaticClass() BulletPropertiesAsset = Valid asset MuzzleVelocityMin > 0 MuzzleVelocityMax > 0 -
Verify Spawning Logic
// Add debug logging UE_LOG(LogTemp, Warning, TEXT("Attempting to fire bullet")); if (!BulletClass) { UE_LOG(LogTemp, Error, TEXT("BulletClass is null!")); return; } -
Check World Reference
// Ensure valid world context UWorld* World = GetWorld(); if (!World) { UE_LOG(LogTemp, Error, TEXT("No valid world for bullet spawn")); return; }
Bullets Spawning But Not Moving
Symptoms:
- Bullets appear at muzzle but don't travel
- Static bullet actors in world
Solutions:
-
Check Initial Velocity
// Bullet velocity should be set on spawn Bullet->Velocity = MuzzleDirection * MuzzleVelocity; // Verify velocity is not zero if (Bullet->Velocity.IsNearlyZero()) { UE_LOG(LogTemp, Warning, TEXT("Bullet velocity is zero!")); } -
Verify Actor Tick
// In bullet constructor, ensure: PrimaryActorTick.bCanEverTick = true; -
Check Physics Settings
// Ensure physics simulation is enabled Bullet->SetActorEnableCollision(true);
No Impact Detection
Symptoms:
- Bullets pass through objects without impact
- No impact events or effects
Debugging Steps:
-
Check Collision Settings
// Verify collision channel TraceChannel = ECC_WorldStatic // or appropriate channel TraceComplex = true // for complex collision -
Verify Target Collision
- Ensure target has collision enabled
- Check collision response to bullet trace channel
- Verify mesh has collision geometry
-
Debug Visualization
// Enable debug traces Bullet->DebugEnabled = true; Bullet->DebugTrailTime = 2.0f;
Incorrect Penetration/Ricochet Behavior
Symptoms:
- Bullets always penetrate or never penetrate
- Ricochet behavior doesn't match material properties
Solutions:
-
Check Material Response Map
// Verify material is in response map if (!MaterialResponseMap->Map.Contains(PhysicalMaterial)) { UE_LOG(LogTemp, Warning, TEXT("Material not found in response map")); } -
Verify Physical Material Assignment
- Check target mesh has Physical Material assigned
- Ensure Physical Material is not null in hit result
-
Check New Impact System
// Ensure new system is enabled Bullet->UseNewImpactSystem = true; // Verify component exists if (!Bullet->BallisticImpactComponent) { UE_LOG(LogTemp, Error, TEXT("BallisticImpactComponent is null")); }
Performance Issues
Low Frame Rate with Many Bullets
Symptoms:
- FPS drops when firing rapidly
- Hitches during bullet simulation
Optimization Steps:
-
Enable Object Pooling
Bullet->EnablePooling = true; Bullet->MaxPoolSize = 50; // Adjust based on needs -
Reduce Trace Complexity
// Reduce traces per step Bullet->MaxTracesPerStep = 4; // Down from 8 // Use simple collision for distant bullets Bullet->TraceComplex = false; -
Implement LOD System
// Distance-based quality scaling float Distance = FVector::Dist(Bullet->GetActorLocation(), PlayerLocation); if (Distance > 5000.0f) { Bullet->FixedStepSeconds = 0.2f; // Lower frequency } -
Profile Performance
// Use built-in profiling stat game stat engine stat collision
Memory Usage Issues
Symptoms:
- Increasing memory usage over time
- Out of memory errors during extended play
Solutions:
-
Check Pool Cleanup
// Ensure bullets are properly deactivated void AEBBullet::Deactivate() { SetActorHiddenInGame(true); SetActorEnableCollision(false); DeactivateToPool(); // Return to pool } -
Limit Pool Sizes
// Prevent unlimited pool growth Bullet->MaxPoolSize = 100; // Hard limit -
Monitor Actor Count
// Debug actor counts UE_LOG(LogTemp, Warning, TEXT("Active bullets: %d"), GetWorld()->GetActorCount<AEBBullet>());
Network Issues
Bullets Not Replicating
Symptoms:
- Bullets visible on server but not clients
- Desync between players
Solutions:
-
Check Replication Settings
// In bullet constructor bReplicates = true; SetReplicateMovement(true); -
Verify Network Role
// Only spawn bullets on server if (HasAuthority()) { SpawnBullet(); } -
Check Bandwidth Usage
net.PackageMap.DebugObject BulletClass stat net
Prediction Issues
Symptoms:
- Laggy bullet impacts
- Bullets appear to "jump" position
Solutions:
-
Enable Client Prediction
// Allow client-side impact prediction Bullet->bNetUseOwnerRelevancy = true; -
Adjust Prediction Settings
// Fine-tune prediction parameters Bullet->NetCullDistanceSquared = 10000000.0f; // 1000m
Blueprint Issues
Events Not Firing
Symptoms:
- OnBallisticImpact events don't trigger
- Custom impact logic not executing
Solutions:
-
Check Event Binding
// Verify event is bound in BeginPlay BallisticImpactComponent->OnBallisticImpact.AddDynamic( this, &AMyActor::HandleImpact); -
Verify Component Reference
- Ensure BallisticImpactComponent exists on actor
- Check component is properly initialized
-
Debug Event Calls
// Add logging to verify events void HandleImpact(/* parameters */) { UE_LOG(LogTemp, Warning, TEXT("Impact event received")); }
Asset References Not Working
Symptoms:
- Bullet Properties Asset shows as None
- Material Response Map not found
Solutions:
-
Check Asset Paths
// Verify asset references are valid if (!BulletPropertiesAsset) { UE_LOG(LogTemp, Error, TEXT("BulletPropertiesAsset is null")); } -
Recreate Asset References
- Delete and reassign asset references
- Check for missing asset redirects
Debug Tools
Enable Debug Visualization
// In bullet settings
DebugEnabled = true
DebugTrailTime = 2.0
DebugTrailWidth = 1.0
DebugTrailColorFast = Green
DebugTrailColorSlow = Red
Impact Information Widget
EasyBallistics includes a widget to display detailed information about bullet impacts in real-time. This is useful for debugging penetration, ricochets, and material responses.
How to Enable:
- Enable on Barrel: On your
EBBarrelcomponent, set theDebugImpactInfoboolean property totrue. - Create a Widget Blueprint:
- In the Content Browser, click "Add New" -> "User Interface" -> "Widget Blueprint".
- In the "Pick Parent Class" dialog, search for and select
EBDebugImpactWidget. - Name and save your new widget Blueprint. You can customize its appearance here.
- Assign to Bullet: On your
EBBulletasset, find theDebugWidgetClassproperty and assign the Widget Blueprint you just created.
Displayed Information:
When enabled, a widget will appear at the location of an impact, showing the following:
- Impact Type: Whether the bullet
RICOCHET,PENETRATION, or wasSTOPPED. - Material: The name of the
UPhysicalMaterialthat was hit. - Velocity: The bullet's velocity at impact, in meters per second (m/s) and kilometers per hour (km/h).
- Mass: The effective mass of the bullet in kilograms (kg).
- Diameter: The effective diameter of the bullet in centimeters (cm).
- Energy: The kinetic energy of the bullet at impact, in Joules (J).
- Penetration: The depth of penetration in centimeters (cm).
Console Commands
// Show bullet debug info
showdebug collision
showdebug physics
// Network debugging
net.PackageMap.DebugObject AEBBullet
stat net
// Performance profiling
stat game
stat collision
stat memory
Logging Categories
Add to DefaultEngine.ini:
[Core.Log]
LogEasyBallistics=VeryVerbose
LogNetPlayerMovement=Verbose
LogCollision=Warning
Getting Help
Before Reporting Issues
-
Check Documentation
- Review relevant API documentation
- Check tutorials for similar setups
-
Gather Information
- UE version and platform
- Plugin version
- Minimal reproduction steps
- Error logs and stack traces
-
Search Existing Issues
- Check GitHub issues
- Search community forums
Support Channels
- GitHub Issues: Report bugs and feature requests
- Discord: Real-time community support
- Forums: Unreal Engine community forums
- Email: support@easyballistics.com
Issue Template
When reporting issues, include:
**Environment:**
- UE Version: 5.6.0
- Platform: Windows 10
- Plugin Version: 2.83
**Issue Description:**
Brief description of the problem
**Steps to Reproduce:**
1. Step one
2. Step two
3. Expected vs actual behavior
**Logs:**
Attach relevant log files
**Additional Context:**
Screenshots, videos, or other helpful information