Basics
A detailed guide on how to setup the firearm using its wizard.
Last updated
Was this helpful?
A detailed guide on how to setup the firearm using its wizard.
Last updated
Was this helpful?
Start by creating a first person controller as mentioned
The FPS Framework includes a Firearm Wizard that simplifies the setup process. To access it, right-click anywhere in the hierarchy, then navigate to Akila > FPS Framework > Firearm. This will open the Firearm Wizard window.
Each section represents exactly what its title indicates. Below are the full details:
Name
The name of your firearm. This will be used as the preset name, the GameObject name, and the display name. You can change it later if needed.
Preset
The selected preset from the default firearm options. For example, choosing "Assault Rifle" will apply all the default settings for that weapon type. The same applies to all other preset options.
Replacement
The object that will be spawned when the item is dropped.
Firearm HUD
The FirearmHUD prefab that displays all relevant firearm information.
Crosshair
The crosshair assigned to your firearm type.
Shooting Mechanisim
Defines how projectiles are fired. Hitscan uses a Raycast for instant impact, while Projectile spawns a physical projectile.
Shooting Direction
The origin point from which projectiles are fired.
Firerate
The rate at which projectiles or hitscan shots are fired.
Muzzle Velocity
The velocity at which physical projectiles travel.
Range
The maximum range where hits can damage items.
Fire Sound
The fire audio profile to be played when gun is fired.
Reload Sound
The reload audio profile to be played during reloading.
Auto Generate
If enabled, the AudioClips below will be activated. Upon firearm creation, the corresponding Audio Profiles will be generated and assigned.
Fire Audio Clip
The fire audio clip to be used in the generated audio profile.
Reload Audio Clip
The reload audio clip to be used in the generated audio profile.
Generate Prefab
After clicking the "Create" button, the Save Scriptable Object window will appear. Select a save path and click "Save." The firearm will now be successfully created.
Make sure to drag your newly created firearm game object into your player's inventory game object as a child.
See to understand this section.
Generates a prefab of the created firearm. This is useful for later use as a pickable item. For more information, refer to the section.