10#include <glm/vec3.hpp>
47 static constexpr std::array<ViewmodelParams, 4> k_params{{
82 return k_params[
static_cast<std::size_t
>(type)];
88 static const std::array<ThirdPersonWeaponParams, 4> k_params{{
91 .handOffset = {1.5f, -3.5f, 14.0f},
97 .handOffset = {1.5f, -3.5f, 14.0f},
102 {.scale = 1.0f, .handOffset = {7.5f, 7.5f, 15.0f}, .yawOffset = 0.0f, .pitchOffset = 96.0f, .rollOffset = 2.0f},
104 {.scale = 1.0f, .handOffset = {7.5f, 7.0f, 6.0f}, .yawOffset = 6.0f, .pitchOffset = 94.0f, .rollOffset = 0.0f},
107 return k_params[
static_cast<std::size_t
>(type)];
113 static constexpr std::array<WeaponModelInfo, 4> k_infos{{
114 {.
filename =
"r-301_-_apex_legends.glb", .flipUVs =
true},
115 {.filename =
"r-301_-_apex_legends.glb", .flipUVs =
true},
116 {.filename =
"apex_legends_triple_take_marksman.glb", .flipUVs =
true},
117 {.filename =
"apex_legends_wingman_pistol.glb", .flipUVs =
true},
119 return k_infos[
static_cast<std::size_t
>(type)];
125 static constexpr std::array<RecoilParams, 4> k_params{{
127 {.
pitchKick = 2.0f, .pushBack = 1.5f, .rollKick = 0.5f, .recoverySpeed = 14.0f},
129 {.pitchKick = 8.0f, .pushBack = 5.0f, .rollKick = 2.0f, .recoverySpeed = 6.0f},
131 {.pitchKick = 5.0f, .pushBack = 3.0f, .rollKick = 1.0f, .recoverySpeed = 8.0f},
133 {.pitchKick = 6.0f, .pushBack = 4.0f, .rollKick = 1.5f, .recoverySpeed = 7.0f},
136 return k_params[
static_cast<std::size_t
>(type)];
Projectile component and weapon/surface type enumerations.
const ThirdPersonWeaponParams & getThirdPersonWeaponParams(WeaponType type)
Returns third-person weapon attachment params for remote players.
Definition ViewmodelConfig.hpp:86
const RecoilParams & getRecoilParams(WeaponType type)
Returns visual recoil params for a weapon type.
Definition ViewmodelConfig.hpp:123
const ViewmodelParams & getViewmodelParams(WeaponType type)
Returns viewmodel positioning params for a weapon type.
Definition ViewmodelConfig.hpp:45
WeaponModelInfo getWeaponModelInfo(WeaponType type)
Returns the GLB filename and load flags for a weapon type.
Definition ViewmodelConfig.hpp:111
WeaponType
Weapon type — determines tracer style, damage, sound, and impact effects.
Definition WeaponState.hpp:10
Visual recoil params per weapon type (viewmodel-only, does not affect aim).
Definition ViewmodelConfig.hpp:37
float rollKick
Degrees of random roll kick per shot.
Definition ViewmodelConfig.hpp:40
float recoverySpeed
Spring decay rate (higher = snappier recovery).
Definition ViewmodelConfig.hpp:41
float pitchKick
Degrees of upward pitch kick per shot.
Definition ViewmodelConfig.hpp:38
float pushBack
Quake units of backward push per shot.
Definition ViewmodelConfig.hpp:39
Third-person weapon attachment params for remote players.
Definition ViewmodelConfig.hpp:22
float scale
Definition ViewmodelConfig.hpp:23
glm::vec3 handOffset
Definition ViewmodelConfig.hpp:24
float rollOffset
Definition ViewmodelConfig.hpp:25
float pitchOffset
Definition ViewmodelConfig.hpp:25
float yawOffset
Definition ViewmodelConfig.hpp:25
First-person viewmodel positioning/rotation params per weapon type.
Definition ViewmodelConfig.hpp:14
float yawOffset
Definition ViewmodelConfig.hpp:17
float forward
Definition ViewmodelConfig.hpp:16
float scale
Definition ViewmodelConfig.hpp:15
float rollOffset
Definition ViewmodelConfig.hpp:17
float right
Definition ViewmodelConfig.hpp:16
float pitchOffset
Definition ViewmodelConfig.hpp:17
float down
Definition ViewmodelConfig.hpp:16
Asset filename + load flags for a weapon model.
Definition ViewmodelConfig.hpp:30
const char * filename
Definition ViewmodelConfig.hpp:31
bool flipUVs
Definition ViewmodelConfig.hpp:32