-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
🔄 Extension updateAn update for an existing extensionAn update for an existing extension
Description
Changes
This creates a massive overhaul of the FireBullet3D system to make it production-ready for FPS/TPS games.
Major Bug Fixes & Stability:
- Fixed Aim Drift: Replaced simple screen-center logic with "Screen-Space to World-Space" coordinate conversion. The extension now calculates Normalized Device Coordinates (NDC) based on the specific UI Layer dimensions, ensuring the gun shoots exactly where the crosshair is, regardless of window resolution or aspect ratio.
- Fixed Time Scaling: Replaced
Date.now()withruntimeScene.getTimeManager().getTimeFromStart(). Weapon cooldowns and reload timers now correctly respect the game's Time Scale and Pause state. - Fixed Physics 2.0 Crashes: Implemented "Duck Typing" checks for physics actions. The extension now detects if the target bullet/shell uses Physics 2.0 (Box2D) or Physics 3.0 and avoids calling
setLinearVelocityZon 2D objects, preventing runtime crashes.
How to use the new features
- Gravity Scale: In the Behavior Properties, set "Bullet Gravity Scale". Set to 0 for straight-flying rockets/lasers, or 1.0 for standard physics drop.
- Crosshair Aiming: When using "Spawn Bullet" or "Shoot Hitscan Ray", drag your UI Crosshair sprite into the "The_Crosshair" parameter. The extension will automatically calculate the 3D depth ray from that 2D icon.
- Shell Ejection: Use the "Spawn Shell Casing" action immediately after shooting.
- Shell Object: Needs a Physics 2.0 or 3.0 behavior.
- Offset Y: Controls how far to the right/left of the gun the shell appears.
- Force Side/Up: Controls the ejection power.
Checklist
- I've followed all of the best practices.
- I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
- I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.
Metadata
Metadata
Assignees
Labels
🔄 Extension updateAn update for an existing extensionAn update for an existing extension