-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Labels
✨ New extensionA new extensionA new extension
Description
Description
A comprehensive "Plug-and-Play" weapon system for 3D FPS and TPS games. This extension bridges the gap between 2D UI (Crosshairs) and 3D World Space.
Key Features:
- Hybrid Architecture: Supports both Physical Projectiles (Bullets/Rockets) and Hitscan (Instant Lasers/Snipers).
- Smart-Aim System: Uses Normalized Device Coordinates (NDC) to calculate the exact vector from the camera through the 2D crosshair. This fixes parallax errors and ensures 100% accuracy regardless of screen resolution or aspect ratio.
- Physics Integration: Includes a custom "Gravity Scale" property, allowing specific weapons (like Snipers) to have low bullet drop while others (Grenades) have high drop, independent of global gravity.
- Robust Ammo Cycle: Manages Clip Size, Current Ammo, Reserve Ammo, and Auto-Reload logic.
- Time-Scale Safe: All timers (Fire Rate, Reload) use the Scene Time Manager, ensuring weapons pause correctly when the game is paused or in slow-motion.
How to use the extension
- Setup: Add the Firebullet3D behavior to your Gun object.
- Properties: Configure your Clip Size, Fire Rate, and Gravity Scale (0 = Straight flying, 1 = Normal physics drop).
- Logic:
- Use the condition "Is Gun Ready To Fire?" to check cooldowns and ammo.
- Use the action "Spawn Bullet" or "Shoot Hitscan Ray".
- Important: Drag your UI Crosshair object into the "Crosshair" parameter of these actions to enable the Smart-Aim accuracy.
- Reloading: Use the "Reload Gun" action to trigger the reload timer.
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.
Example file
Extension file
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
✨ New extensionA new extensionA new extension