-
Notifications
You must be signed in to change notification settings - Fork 0
Firearms
Nate River edited this page Feb 27, 2025
·
9 revisions
Start from finding FirearmCollection (Scriptable Object) located in Resources. It contains the full list of all firearms with all parameters. Important params are Fire Muzzle Prefab and Projectile Prefab.
Firearm script responsible for shooting is located in CharacterScripts folder. It's attached to all characters (Pelvis/Torso/ArmR[1]/ForearmR/HandR/Firearm). There are also FirearmFire and FirearmReload scripts.
To set firearms from code you need to call Character.BuildFirearms(...) and pass a FirearmParams instance. You can get FirearmParams from FirearmCollection.