1pub mod alpha;
2pub mod beam;
3pub mod beta;
4pub mod blink;
5pub mod charge;
6pub mod chargemelee;
7pub mod combomelee;
8pub mod dash;
9pub mod equip;
10pub mod idle;
11pub mod jump;
12pub mod leapmelee;
13pub mod leapshockwave;
14pub mod rapidmelee;
15pub mod run;
16pub mod selfbuff;
17pub mod shockwave;
18pub mod shoot;
19pub mod spin;
20pub mod spritesummon;
21pub mod stunned;
22pub mod summon;
23pub mod wield;
24
25pub use self::{
27 alpha::AlphaAnimation, beam::BeamAnimation, beta::BetaAnimation, blink::BlinkAnimation,
28 charge::ChargeAnimation, chargemelee::ChargeMeleeAnimation, combomelee::ComboAnimation,
29 dash::DashAnimation, equip::EquipAnimation, idle::IdleAnimation, jump::JumpAnimation,
30 leapmelee::LeapAnimation, leapshockwave::LeapShockAnimation, rapidmelee::RapidMeleeAnimation,
31 run::RunAnimation, selfbuff::SelfBuffAnimation, shockwave::ShockwaveAnimation,
32 shoot::ShootAnimation, spin::SpinAnimation, spritesummon::SpriteSummonAnimation,
33 stunned::StunnedAnimation, summon::SummonAnimation, wield::WieldAnimation,
34};
35
36use super::{FigureBoneData, Offsets, Skeleton, make_bone, vek::*};
37use common::comp::{self};
38use core::{convert::TryFrom, f32::consts::PI};
39
40pub type Body = comp::biped_large::Body;
41
42skeleton_impls!(struct BipedLargeSkeleton {
43 + head,
44 + jaw,
45 + upper_torso,
46 + lower_torso,
47 + tail,
48 + main,
49 + second,
50 + shoulder_l,
51 + shoulder_r,
52 + hand_l,
53 + hand_r,
54 + leg_l,
55 + leg_r,
56 + foot_l,
57 + foot_r,
58 + hold,
59 torso,
60 control,
61 control_l,
62 control_r,
63 weapon_l,
64 weapon_r,
65 leg_control_l,
66 leg_control_r,
67 arm_control_l,
68 arm_control_r,
69});
70
71impl Skeleton for BipedLargeSkeleton {
72 type Attr = SkeletonAttr;
73 type Body = Body;
74
75 const BONE_COUNT: usize = 16;
76 #[cfg(feature = "use-dyn-lib")]
77 const COMPUTE_FN: &'static [u8] = b"biped_large_compute_mats\0";
78
79 #[cfg_attr(
80 feature = "be-dyn-lib",
81 unsafe(export_name = "biped_large_compute_mats")
82 )]
83 fn compute_matrices_inner(
84 &self,
85 base_mat: Mat4<f32>,
86 buf: &mut [FigureBoneData; super::MAX_BONE_COUNT],
87 body: Self::Body,
88 ) -> Offsets {
89 let base_mat = base_mat * Mat4::scaling_3d(SkeletonAttr::from(&body).scaler / 8.0);
90
91 let torso_mat = base_mat * Mat4::<f32>::from(self.torso);
92 let upper_torso_mat = torso_mat * Mat4::<f32>::from(self.upper_torso);
93 let control_mat = Mat4::<f32>::from(self.control);
94 let control_l_mat = Mat4::<f32>::from(self.control_l);
95 let control_r_mat = Mat4::<f32>::from(self.control_r);
96 let weapon_l_mat = control_mat * Mat4::<f32>::from(self.weapon_l);
97 let weapon_r_mat = control_mat * Mat4::<f32>::from(self.weapon_r);
98 let lower_torso_mat = upper_torso_mat * Mat4::<f32>::from(self.lower_torso);
99
100 let leg_l = Mat4::<f32>::from(self.leg_l);
101 let leg_r = Mat4::<f32>::from(self.leg_r);
102
103 let leg_control_l = lower_torso_mat * Mat4::<f32>::from(self.leg_control_l);
104 let leg_control_r = lower_torso_mat * Mat4::<f32>::from(self.leg_control_r);
105
106 let arm_control_l = upper_torso_mat * Mat4::<f32>::from(self.arm_control_l);
107 let arm_control_r = upper_torso_mat * Mat4::<f32>::from(self.arm_control_r);
108
109 let head_mat = upper_torso_mat * Mat4::<f32>::from(self.head);
110 let hand_l_mat = Mat4::<f32>::from(self.hand_l);
111
112 let jaw_mat = head_mat * Mat4::<f32>::from(self.jaw);
113
114 *(<&mut [_; Self::BONE_COUNT]>::try_from(&mut buf[0..Self::BONE_COUNT]).unwrap()) = [
115 make_bone(head_mat),
116 make_bone(jaw_mat),
117 make_bone(upper_torso_mat),
118 make_bone(lower_torso_mat),
119 make_bone(lower_torso_mat * Mat4::<f32>::from(self.tail)),
120 make_bone(upper_torso_mat * weapon_l_mat * Mat4::<f32>::from(self.main)),
121 make_bone(upper_torso_mat * weapon_r_mat * Mat4::<f32>::from(self.second)),
122 make_bone(arm_control_l * Mat4::<f32>::from(self.shoulder_l)),
123 make_bone(arm_control_r * Mat4::<f32>::from(self.shoulder_r)),
124 make_bone(
125 arm_control_l * weapon_l_mat * control_l_mat * Mat4::<f32>::from(self.hand_l),
126 ),
127 make_bone(
128 arm_control_r * weapon_r_mat * control_r_mat * Mat4::<f32>::from(self.hand_r),
129 ),
130 make_bone(leg_control_l * leg_l),
131 make_bone(leg_control_r * leg_r),
132 make_bone(leg_control_l * Mat4::<f32>::from(self.foot_l)),
133 make_bone(leg_control_r * Mat4::<f32>::from(self.foot_r)),
134 make_bone(upper_torso_mat * control_mat * hand_l_mat * Mat4::<f32>::from(self.hold)),
136 ];
137
138 use comp::biped_large::Species::*;
139 let (mount_mat, mount_orientation) = match (body.species, body.body_type) {
142 (Dullahan | Occultsaurok | Mightysaurok | Slysaurok | Tidalwarrior, _) => (
143 upper_torso_mat,
144 self.torso.orientation * self.upper_torso.orientation,
145 ),
146 _ => (
147 arm_control_r * Mat4::<f32>::from(self.shoulder_r),
148 self.torso.orientation
149 * self.upper_torso.orientation
150 * self.arm_control_r.orientation
151 * self.shoulder_r.orientation,
152 ),
153 };
154
155 let mount_position = mount_mat.mul_point(mount_point(&body));
158
159 Offsets {
160 viewpoint: Some((jaw_mat * Vec4::new(0.0, 4.0, 0.0, 1.0)).xyz()),
161 mount_bone: Transform {
162 position: mount_position,
163 orientation: mount_orientation,
164 scale: Vec3::one(),
165 },
166 ..Default::default()
167 }
168 }
169}
170
171pub struct SkeletonAttr {
172 head: (f32, f32),
173 jaw: (f32, f32),
174 upper_torso: (f32, f32),
175 lower_torso: (f32, f32),
176 tail: (f32, f32),
177 shoulder: (f32, f32, f32),
178 hand: (f32, f32, f32),
179 leg: (f32, f32, f32),
180 foot: (f32, f32, f32),
181 scaler: f32,
182 tempo: f32,
183 grip: (f32, f32),
184 shl: (f32, f32, f32, f32, f32, f32),
185 shr: (f32, f32, f32, f32, f32, f32),
186 sc: (f32, f32, f32, f32, f32, f32),
187 hhl: (f32, f32, f32, f32, f32, f32),
188 hhr: (f32, f32, f32, f32, f32, f32),
189 hc: (f32, f32, f32, f32, f32, f32),
190 sthl: (f32, f32, f32, f32, f32, f32),
191 sthr: (f32, f32, f32, f32, f32, f32),
192 stc: (f32, f32, f32, f32, f32, f32),
193 bhl: (f32, f32, f32, f32, f32, f32),
194 bhr: (f32, f32, f32, f32, f32, f32),
195 bc: (f32, f32, f32, f32, f32, f32),
196 beast: bool,
197 float: bool,
198 height: f32,
199}
200
201impl<'a> TryFrom<&'a comp::Body> for SkeletonAttr {
202 type Error = ();
203
204 fn try_from(body: &'a comp::Body) -> Result<Self, Self::Error> {
205 match body {
206 comp::Body::BipedLarge(body) => Ok(SkeletonAttr::from(body)),
207 _ => Err(()),
208 }
209 }
210}
211
212impl Default for SkeletonAttr {
213 fn default() -> Self {
214 Self {
215 head: (0.0, 0.0),
216 jaw: (0.0, 0.0),
217 upper_torso: (0.0, 0.0),
218 lower_torso: (0.0, 0.0),
219 tail: (0.0, 0.0),
220 shoulder: (0.0, 0.0, 0.0),
221 hand: (0.0, 0.0, 0.0),
222 leg: (0.0, 0.0, 0.0),
223 foot: (0.0, 0.0, 0.0),
224 scaler: 0.0,
225 tempo: 0.0,
226 grip: (0.0, 0.0),
227 shl: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
228 shr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
229 sc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
230 hhl: (0.0, 0.0, 10.0, 0.0, 0.0, 0.0),
231 hhr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
232 hc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
233 sthl: (0.0, 0.0, 10.0, 0.0, 0.0, 0.0),
234 sthr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
235 stc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
236 bhl: (0.0, 0.0, 10.0, 0.0, 0.0, 0.0),
237 bhr: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
238 bc: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
239 beast: false,
240 float: false,
241 height: 0.0,
242 }
243 }
244}
245
246impl<'a> From<&'a Body> for SkeletonAttr {
247 fn from(body: &'a Body) -> Self {
248 use comp::biped_large::{BodyType::*, Species::*};
249 Self {
250 head: match (body.species, body.body_type) {
251 (Ogre, Male) => (5.0, 6.0),
252 (Ogre, Female) => (1.0, 7.5),
253 (Cyclops, _) => (9.5, 7.5),
254 (Wendigo, _) => (3.0, 7.5),
255 (Cavetroll, _) => (9.0, 7.0),
256 (Mountaintroll, _) => (13.0, 2.0),
257 (Swamptroll, _) => (11.0, 2.0),
258 (Dullahan, _) => (3.0, 6.0),
259 (Werewolf, _) => (11.5, 1.0),
260 (Occultsaurok, _) => (6.0, 3.5),
261 (Mightysaurok, _) => (6.0, 3.5),
262 (Slysaurok, _) => (6.0, 3.5),
263 (Mindflayer, _) => (5.0, 5.5),
264 (Minotaur, _) => (6.0, 3.0),
265 (Tidalwarrior, _) => (6.5, 5.0),
266 (Yeti, _) => (8.5, 4.0),
267 (Harvester, _) => (6.0, 11.0),
268 (Blueoni, _) => (10.5, -3.0),
269 (Redoni, _) => (10.5, -3.0),
270 (Cultistwarlord, _) => (0.5, 14.5),
271 (Cultistwarlock, _) => (0.5, 11.0),
272 (Huskbrute, _) => (8.5, 4.0),
273 (Tursus, _) => (-4.5, -14.0),
274 (Gigasfrost, _) => (-1.5, 5.0),
275 (AdletElder, _) => (-8.0, 10.0),
276 (SeaBishop, _) => (0.0, 9.5),
277 (HaniwaGeneral, _) => (-1.5, 10.0),
278 (TerracottaBesieger, _) => (-2.5, 16.0),
279 (TerracottaDemolisher, _) => (-2.5, 10.0),
280 (TerracottaPunisher, _) => (-2.5, 10.0),
281 (TerracottaPursuer, _) => (-2.0, 13.5),
282 (Cursekeeper, _) => (2.0, 6.5),
283 (Forgemaster, _) => (5.0, 6.0),
284 (Strigoi, _) => (10.0, 8.0),
285 (Executioner, _) => (0.0, 10.0),
286 },
287 jaw: match (body.species, body.body_type) {
288 (Ogre, _) => (0.0, 0.0),
289 (Cyclops, _) => (-4.5, -6.0),
290 (Wendigo, _) => (0.0, 0.0),
291 (Cavetroll, _) => (0.0, -4.0),
292 (Mountaintroll, _) => (-1.0, -8.0),
293 (Swamptroll, _) => (-4.0, -4.5),
294 (Dullahan, _) => (0.0, 0.0),
295 (Werewolf, _) => (5.0, -4.5),
296 (Occultsaurok, _) => (1.0, -2.5),
297 (Mightysaurok, _) => (1.0, -2.5),
298 (Slysaurok, _) => (1.0, -2.5),
299 (Mindflayer, _) => (0.0, 0.0),
300 (Minotaur, _) => (2.0, -4.0),
301 (Tidalwarrior, _) => (0.0, 0.0),
302 (Yeti, _) => (-5.0, -5.0),
303 (Harvester, _) => (-2.0, -7.0),
304 (Blueoni, _) => (0.0, 3.5),
305 (Redoni, _) => (0.0, 3.5),
306 (Cultistwarlord, _) => (0.0, 3.5),
307 (Cultistwarlock, _) => (0.0, 3.5),
308 (Huskbrute, _) => (-5.0, -5.0),
309 (Tursus, _) => (4.0, 10.5),
310 (Gigasfrost, _) => (-1.0, 5.5),
311 (AdletElder, _) => (10.5, -7.0),
312 (SeaBishop, _) => (5.0, -4.5),
313 (HaniwaGeneral, _) => (10.5, -7.0),
314 (TerracottaBesieger, _) => (10.5, -7.0),
315 (TerracottaDemolisher, _) => (10.5, -7.0),
316 (TerracottaPunisher, _) => (10.5, -7.0),
317 (TerracottaPursuer, _) => (10.5, -7.0),
318 (Cursekeeper, _) => (10.5, -7.0),
319 (Forgemaster, _) => (-1.0, 5.5),
320 (Strigoi, _) => (-2.0, -4.0),
321 (Executioner, _) => (-2.0, -4.0),
322 },
323 upper_torso: match (body.species, body.body_type) {
324 (Ogre, Male) => (0.0, 27.5),
325 (Ogre, Female) => (0.0, 28.0),
326 (Cyclops, _) => (-2.0, 31.0),
327 (Wendigo, _) => (-1.0, 29.0),
328 (Cavetroll, _) => (-1.0, 26.5),
329 (Mountaintroll, _) => (-1.0, 30.5),
330 (Swamptroll, _) => (-1.0, 28.5),
331 (Dullahan, _) => (0.0, 29.0),
332 (Werewolf, _) => (3.0, 26.0),
333 (Occultsaurok, _) => (3.0, 24.0),
334 (Mightysaurok, _) => (3.0, 24.0),
335 (Slysaurok, _) => (3.0, 24.0),
336 (Mindflayer, _) => (0.0, 30.5),
337 (Minotaur, _) => (-1.0, 31.5),
338 (Tidalwarrior, _) => (-1.0, 25.0),
339 (Yeti, _) => (-1.0, 23.5),
340 (Harvester, _) => (-1.0, 18.0),
341 (Blueoni, _) => (-1.0, 26.5),
342 (Redoni, _) => (-1.0, 26.5),
343 (Cultistwarlord, _) => (-1.0, 18.5),
344 (Cultistwarlock, _) => (-1.0, 17.5),
345 (Huskbrute, _) => (-1.0, 23.5),
346 (Tursus, _) => (3.0, 26.0),
347 (Gigasfrost, _) => (-1.0, 30.0),
348 (AdletElder, _) => (3.0, 19.0),
349 (SeaBishop, _) => (0.0, 15.0),
350 (HaniwaGeneral, _) => (3.0, 16.0),
351 (TerracottaBesieger, _) => (3.0, 21.5),
352 (TerracottaDemolisher, _) => (3.0, 16.5),
353 (TerracottaPunisher, _) => (3.0, 15.5),
354 (TerracottaPursuer, _) => (3.0, 15.5),
355 (Cursekeeper, _) => (-4.0, 20.0),
356 (Forgemaster, _) => (-1.0, 32.0),
357 (Strigoi, _) => (-4.0, 27.5),
358 (Executioner, _) => (0.0, 24.0),
359 },
360 lower_torso: match (body.species, body.body_type) {
361 (Ogre, Male) => (1.0, -7.0),
362 (Ogre, Female) => (0.0, -6.0),
363 (Cyclops, _) => (1.0, -8.5),
364 (Wendigo, _) => (-1.5, -6.0),
365 (Cavetroll, _) => (1.0, -9.5),
366 (Mountaintroll, _) => (1.0, -13.5),
367 (Swamptroll, _) => (1.5, -11.5),
368 (Dullahan, _) => (0.0, -6.5),
369 (Werewolf, _) => (1.0, -10.0),
370 (Occultsaurok, _) => (0.0, -5.0),
371 (Mightysaurok, _) => (0.0, -5.0),
372 (Slysaurok, _) => (0.0, -6.0),
373 (Mindflayer, _) => (3.5, -10.0),
374 (Minotaur, _) => (1.5, -8.5),
375 (Tidalwarrior, _) => (0.0, -9.5),
376 (Yeti, _) => (0.0, -6.5),
377 (Harvester, _) => (-1.0, -4.5),
378 (Blueoni, _) => (0.0, -8.5),
379 (Redoni, _) => (0.0, -8.5),
380 (Cultistwarlord, _) => (0.0, -1.5),
381 (Cultistwarlock, _) => (1.0, -2.5),
382 (Huskbrute, _) => (-0.5, -7.0),
383 (Tursus, _) => (-5.0, -9.0),
384 (Gigasfrost, _) => (0.0, -5.5),
385 (AdletElder, _) => (0.0, -4.0),
386 (SeaBishop, _) => (0.0, -1.0),
387 (HaniwaGeneral, _) => (-1.0, -3.5),
388 (TerracottaBesieger, _) => (-1.0, -4.5),
389 (TerracottaDemolisher, _) => (-2.0, -3.5),
390 (TerracottaPunisher, _) => (-1.5, -2.5),
391 (TerracottaPursuer, _) => (-1.5, -2.5),
392 (Cursekeeper, _) => (-1.5, -4.5),
393 (Forgemaster, _) => (0.0, -5.5),
394 (Strigoi, _) => (3.0, -9.0),
395 (Executioner, _) => (-3.0, -5.0),
396 },
397 tail: match (body.species, body.body_type) {
398 (Werewolf, _) => (-5.5, -2.0),
399 (Occultsaurok, _) => (-4.5, -6.0),
400 (Mightysaurok, _) => (-4.5, -6.0),
401 (Slysaurok, _) => (-4.5, -6.0),
402 (Minotaur, _) => (-3.0, -6.0),
403 (AdletElder, _) => (-4.5, -6.0),
404 (Strigoi, _) => (-4.5, -8.0),
405 _ => (0.0, 0.0),
406 },
407 shoulder: match (body.species, body.body_type) {
408 (Ogre, Male) => (12.0, 0.5, 3.0),
409 (Ogre, Female) => (8.0, 0.5, 2.0),
410 (Cyclops, _) => (15.0, 3.5, 1.5),
411 (Wendigo, _) => (9.0, 0.5, 2.5),
412 (Cavetroll, _) => (13.0, 0.0, 0.5),
413 (Mountaintroll, _) => (14.0, -0.5, -2.0),
414 (Swamptroll, _) => (14.0, 0.0, 0.0),
415 (Dullahan, _) => (14.0, 0.5, 3.5),
416 (Werewolf, _) => (9.0, 4.0, -3.0),
417 (Occultsaurok, _) => (7.5, 1.0, 1.5),
418 (Mightysaurok, _) => (7.5, 1.0, 1.5),
419 (Slysaurok, _) => (7.5, 1.0, 1.5),
420 (Mindflayer, _) => (8.0, 0.5, -1.0),
421 (Minotaur, _) => (10.0, 1.0, -1.0),
422 (Tidalwarrior, _) => (14.0, -0.5, 2.0),
423 (Yeti, _) => (10.5, 1.0, -2.5),
424 (Harvester, _) => (8.0, 1.0, -1.5),
425 (Blueoni, _) => (11.0, 2.0, -5.5),
426 (Redoni, _) => (11.0, 2.0, -5.5),
427 (Cultistwarlord, _) => (11.5, -1.0, 4.5),
428 (Cultistwarlock, _) => (8.0, 0.0, 3.5),
429 (Huskbrute, _) => (10.5, 0.0, -1.5),
430 (Tursus, _) => (12.5, -2.5, -2.0),
431 (Gigasfrost, _) => (10.5, 0.5, 0.0),
432 (AdletElder, _) => (8.5, 1.0, 2.5),
433 (SeaBishop, _) => (7.0, 0.0, 1.0),
434 (HaniwaGeneral, _) => (9.0, -1.0, 4.5),
435 (TerracottaBesieger, _) => (13.0, -1.0, 2.0),
436 (TerracottaDemolisher, _) => (9.0, -1.0, 3.0),
437 (TerracottaPunisher, _) => (9.0, -1.0, 4.0),
438 (TerracottaPursuer, _) => (9.0, -1.0, 4.0),
439 (Cursekeeper, _) => (9.5, -0.5, 2.5),
440 (Forgemaster, _) => (20.0, 4.0, 13.0),
441 (Strigoi, _) => (13.5, 2.0, 0.5),
442 (Executioner, _) => (8.5, 0.0, 4.0),
443 },
444 hand: match (body.species, body.body_type) {
445 (Ogre, Male) => (14.5, 0.0, -4.0),
446 (Ogre, Female) => (9.0, 0.5, -4.5),
447 (Cyclops, _) => (14.0, 2.0, -5.5),
448 (Wendigo, _) => (12.0, 0.0, -3.5),
449 (Cavetroll, _) => (13.5, 1.0, -6.0),
450 (Mountaintroll, _) => (13.5, 0.0, -10.0),
451 (Swamptroll, _) => (17.0, 1.0, -8.0),
452 (Dullahan, _) => (14.5, 0.0, -2.5),
453 (Werewolf, _) => (10.0, 2.5, -11.0),
454 (Occultsaurok, _) => (8.0, 1.5, -5.5),
455 (Mightysaurok, _) => (8.0, 1.5, -5.5),
456 (Slysaurok, _) => (8.0, 1.5, -5.5),
457 (Mindflayer, _) => (9.0, 0.5, -4.5),
458 (Minotaur, _) => (12.5, 0.5, -7.0),
459 (Tidalwarrior, _) => (15.5, -0.5, -3.0),
460 (Yeti, _) => (12.0, 1.5, -6.0),
461 (Harvester, _) => (11.5, 1.5, -5.5),
462 (Blueoni, _) => (13.5, 0.5, -8.0),
463 (Redoni, _) => (13.5, 0.5, -8.0),
464 (Cultistwarlord, _) => (11.5, -1.0, -1.0),
465 (Cultistwarlock, _) => (9.5, -1.0, 1.0),
466 (Huskbrute, _) => (13.0, 0.5, -4.0),
467 (Tursus, _) => (15.5, 0.0, -7.0),
468 (Gigasfrost, _) => (17.0, 0.5, -6.0),
469 (AdletElder, _) => (8.0, 1.5, -2.5),
470 (SeaBishop, _) => (10.0, 0.0, -3.0),
471 (HaniwaGeneral, _) => (10.0, -1.0, -3.0),
472 (TerracottaBesieger, _) => (13.5, -1.0, -3.5),
473 (TerracottaDemolisher, _) => (10.0, -1.0, -1.5),
474 (TerracottaPunisher, _) => (10.0, -1.0, -1.5),
475 (TerracottaPursuer, _) => (10.0, -1.0, -1.5),
476 (Cursekeeper, _) => (11.0, -1.0, -4.0),
477 (Forgemaster, _) => (19.0, 4.0, -1.0),
478 (Strigoi, _) => (17.0, 2.5, -5.5),
479 (Executioner, _) => (9.0, 0.5, -1.5),
480 },
481 leg: match (body.species, body.body_type) {
482 (Ogre, Male) => (0.0, 0.0, -4.0),
483 (Ogre, Female) => (0.0, 0.0, -2.0),
484 (Cyclops, _) => (4.5, 1.0, -8.5),
485 (Wendigo, _) => (2.0, 2.0, -2.5),
486 (Cavetroll, _) => (4.5, -1.0, -7.5),
487 (Mountaintroll, _) => (3.5, 0.0, -7.5),
488 (Swamptroll, _) => (4.5, -0.5, -7.5),
489 (Dullahan, _) => (0.0, 0.0, -5.0),
490 (Werewolf, _) => (4.5, 1.0, -5.0),
491 (Occultsaurok, _) => (3.0, 0.5, -4.0),
492 (Mightysaurok, _) => (3.0, 0.5, -4.0),
493 (Slysaurok, _) => (3.0, 0.5, -4.0),
494 (Mindflayer, _) => (6.0, -2.0, 6.5),
495 (Minotaur, _) => (5.0, 0.0, -10.0),
496 (Tidalwarrior, _) => (2.5, 0.0, -5.5),
497 (Yeti, _) => (4.0, 0.0, -5.5),
498 (Harvester, _) => (3.5, 1.0, -4.0),
499 (Blueoni, _) => (4.5, 2.0, -5.5),
500 (Redoni, _) => (4.5, 2.0, -5.5),
501 (Cultistwarlord, _) => (3.5, -1.0, -8.5),
502 (Cultistwarlock, _) => (3.5, -1.0, -8.5),
503 (Huskbrute, _) => (4.0, 0.0, -7.5),
504 (Tursus, _) => (4.5, 1.0, -9.0),
505 (Gigasfrost, _) => (6.0, 0.0, -10.0),
506 (AdletElder, _) => (3.0, -1.5, -4.0),
507 (SeaBishop, _) => (3.0, 1.0, -14.0),
508 (HaniwaGeneral, _) => (3.0, 0.0, -5.0),
509 (TerracottaBesieger, _) => (5.0, 0.5, -6.0),
510 (TerracottaDemolisher, _) => (3.5, 1.5, -5.0),
511 (TerracottaPunisher, _) => (3.5, 1.0, -5.0),
512 (TerracottaPursuer, _) => (3.5, 1.0, -5.0),
513 (Cursekeeper, _) => (5.0, 0.5, -6.0),
514 (Forgemaster, _) => (9.0, 0.0, -10.0),
515 (Strigoi, _) => (5.0, 1.0, -6.0),
516 (Executioner, _) => (3.0, 1.0, -7.0),
517 },
518 foot: match (body.species, body.body_type) {
519 (Ogre, Male) => (4.0, 1.0, -12.0),
520 (Ogre, Female) => (4.0, 0.5, -13.5),
521 (Cyclops, _) => (6.0, 3.5, -15.5),
522 (Wendigo, _) => (5.0, 2.5, -17.0),
523 (Cavetroll, _) => (5.5, 0.0, -14.0),
524 (Mountaintroll, _) => (4.5, 1.0, -14.0),
525 (Swamptroll, _) => (5.5, 0.0, -14.0),
526 (Dullahan, _) => (4.0, 2.5, -14.0),
527 (Werewolf, _) => (5.5, 3.0, -6.5),
528 (Occultsaurok, _) => (3.5, 3.5, -10.0),
529 (Mightysaurok, _) => (3.5, 3.5, -10.0),
530 (Slysaurok, _) => (3.5, 3.5, -10.0),
531 (Mindflayer, _) => (4.5, 1.5, -16.0),
532 (Minotaur, _) => (6.0, 4.5, -17.5),
533 (Tidalwarrior, _) => (3.5, 0.5, -10.5),
534 (Yeti, _) => (4.5, 0.5, -12.5),
535 (Harvester, _) => (4.5, 0.5, -9.5),
536 (Blueoni, _) => (5.0, 5.0, -12.5),
537 (Redoni, _) => (5.0, 5.0, -12.5),
538 (Cultistwarlord, _) => (3.5, 0.0, -12.5),
539 (Cultistwarlock, _) => (3.5, 0.0, -10.5),
540 (Huskbrute, _) => (4.5, 0.5, -12.5),
541 (Tursus, _) => (5.5, 3.0, -14.5),
542 (Gigasfrost, _) => (6.5, 2.0, -19.5),
543 (AdletElder, _) => (4.0, 3.5, -10.0),
544 (SeaBishop, _) => (5.5, 3.0, -6.5),
545 (HaniwaGeneral, _) => (3.0, 1.0, -10.0),
546 (TerracottaBesieger, _) => (5.5, 2.5, -13.0),
547 (TerracottaDemolisher, _) => (3.5, 3.0, -10.5),
548 (TerracottaPunisher, _) => (3.5, 2.0, -10.5),
549 (TerracottaPursuer, _) => (3.5, 2.5, -10.5),
550 (Cursekeeper, _) => (5.5, 2.5, -13.0),
551 (Forgemaster, _) => (8.5, 2.0, -19.5),
552 (Strigoi, _) => (6.0, 2.5, -14.0),
553 (Executioner, _) => (3.0, 7.5, -13.0),
554 },
555 scaler: match (body.species, body.body_type) {
556 (Ogre, Male) => 1.12,
557 (Ogre, Female) => 1.12,
558 (Cyclops, _) => 1.6,
559 (Wendigo, _) => 1.1,
560 (Cavetroll, _) => 1.1,
561 (Mountaintroll, _) => 1.1,
562 (Swamptroll, _) => 1.1,
563 (Dullahan, _) => 1.12,
564 (Werewolf, _) => 1.0,
565 (Occultsaurok, _) => 1.0,
566 (Mightysaurok, _) => 1.0,
567 (Slysaurok, _) => 1.0,
568 (Mindflayer, _) => 1.6,
569 (Minotaur, _) => 1.7,
570 (Tidalwarrior, _) => 1.7,
571 (Yeti, _) => 1.2,
572 (Harvester, _) => 1.2,
573 (Blueoni, _) => 1.2,
574 (Redoni, _) => 1.2,
575 (Cultistwarlord, _) => 1.0,
576 (Cultistwarlock, _) => 1.0,
577 (Huskbrute, _) => 1.2,
578 (Tursus, _) => 1.0,
579 (Gigasfrost, _) => 1.7,
580 (AdletElder, _) => 1.0,
581 (SeaBishop, _) => 1.0,
582 (HaniwaGeneral, _) => 1.0,
583 (TerracottaBesieger, _) => 1.0,
584 (TerracottaDemolisher, _) => 1.0,
585 (TerracottaPunisher, _) => 1.0,
586 (TerracottaPursuer, _) => 1.0,
587 (Cursekeeper, _) => 1.0,
588 (Forgemaster, _) => 1.0,
589 (Strigoi, _) => 1.0,
590 (Executioner, _) => 1.0,
591 },
592 tempo: match (body.species, body.body_type) {
593 (Ogre, Male) => 0.9,
594 (Ogre, Female) => 0.9,
595 (Cyclops, _) => 0.8,
596 (Cavetroll, _) => 0.9,
597 (Mountaintroll, _) => 0.9,
598 (Swamptroll, _) => 0.9,
599 (Dullahan, _) => 0.8,
600 (Minotaur, _) => 0.8,
601 (TerracottaBesieger, _) => 0.7,
602 (TerracottaDemolisher, _) => 0.8,
603 (TerracottaPunisher, _) => 0.8,
604 (TerracottaPursuer, _) => 0.7,
605 (Cursekeeper, _) => 0.8,
606 _ => 1.0,
607 },
608 grip: match (body.species, body.body_type) {
609 (Ogre, Male) => (13.0, 0.0),
610 (Ogre, Female) => (8.0, 0.0),
611 (Cyclops, _) => (12.0, 0.0),
612 (Wendigo, _) => (15.0, 0.0),
613 (Cavetroll, _) => (13.0, 1.5),
614 (Mountaintroll, _) => (13.0, 1.5),
615 (Swamptroll, _) => (15.0, 0.5),
616 (Dullahan, _) => (15.0, 0.0),
617 (Werewolf, _) => (13.0, 0.0),
618 (Occultsaurok, _) => (10.0, 0.0),
619 (Mightysaurok, _) => (10.0, 0.0),
620 (Slysaurok, _) => (10.0, 0.0),
621 (Mindflayer, _) => (12.0, 2.5),
622 (Minotaur, _) => (14.0, 0.0),
623 (Tidalwarrior, _) => (14.0, 0.0),
624 (Yeti, _) => (12.5, 0.0),
625 (Harvester, _) => (7.5, 0.0),
626 (Blueoni, _) => (12.5, 0.0),
627 (Redoni, _) => (12.5, 0.0),
628 (Cultistwarlord, _) => (8.0, 0.0),
629 (Cultistwarlock, _) => (8.0, 0.0),
630 (Huskbrute, _) => (12.5, 0.0),
631 (Tursus, _) => (13.0, 0.0),
632 (Gigasfrost, _) => (16.0, 0.0),
633 (AdletElder, _) => (10.0, 0.0),
634 (SeaBishop, _) => (6.0, 0.0),
635 (HaniwaGeneral, _) => (10.0, 0.0),
636 (TerracottaBesieger, _) => (5.0, 0.0),
637 (TerracottaDemolisher, _) => (6.0, 0.0),
638 (TerracottaPunisher, _) => (6.0, 0.0),
639 (TerracottaPursuer, _) => (6.0, 0.0),
640 (Cursekeeper, _) => (14.0, 0.0),
641 (Forgemaster, _) => (16.0, 0.0),
642 (Strigoi, _) => (12.5, 0.0),
643 (Executioner, _) => (8.0, 0.0),
644 },
645 shl: match (body.species, body.body_type) {
646 (Dullahan, _) => (-4.75, -11.0, 8.5, 1.47, -0.2, 0.0),
647 (Mightysaurok, _) => (-1.75, -9.0, 3.5, 1.47, -0.2, 0.0),
648 _ => (-4.75, -1.0, 2.5, 1.47, -0.2, 0.0),
649 },
650 shr: match (body.species, body.body_type) {
651 (Dullahan, _) => (5.75, -11.5, 4.5, 1.47, 0.3, 0.0),
652 (Mightysaurok, _) => (2.75, -9.5, -0.5, 1.47, 0.3, 0.0),
653 _ => (3.75, -1.5, -0.5, 1.47, 0.3, 0.0),
654 },
655 sc: match (body.species, body.body_type) {
656 (Dullahan, _) => (-7.0, 17.0, -16.0, -0.1, 0.0, 0.0),
657 (Mightysaurok, _) => (-7.0, 15.0, -11.0, -0.1, 0.0, 0.0),
658 _ => (-7.0, 7.0, -10.0, -0.1, 0.0, 0.0),
659 },
660 hhl: match (body.species, body.body_type) {
661 (Ogre, Male) => (-9.0, -10.0, 23.0, PI / 2.0, -0.57, 0.0),
662 _ => (-6.0, -10.0, 17.0, PI / 2.0, -0.57, 0.0),
663 },
664 hhr: match (body.species, body.body_type) {
665 (Ogre, Male) => (-5.0, -13.0, 0.0, PI / 2.0, -0.57, 0.0),
666 _ => (-6.0, -10.0, 0.0, PI / 2.0, -0.57, 0.0),
667 },
668 hc: match (body.species, body.body_type) {
669 (Ogre, Male) => (11.5, 9.0, -13.0, -0.57, -PI / 2.0, 1.0),
670 _ => (8.5, 6.0, -12.0, -0.57, -PI / 2.0, 1.0),
671 },
672 sthl: match (body.species, body.body_type) {
673 (Ogre, Female) => (-1.0, -5.0, 12.0, 1.27, 0.0, 0.0),
674 (Occultsaurok, _) => (-1.0, -7.0, 12.0, 1.27, 0.0, 0.0),
675 (Mindflayer, _) => (1.0, -10.5, 7.0, 1.27, 0.0, 0.0),
676 _ => (11.0, 5.0, -4.0, 1.27, 0.0, 0.0),
677 },
678 sthr: match (body.species, body.body_type) {
679 (Ogre, Female) => (5.0, -3.5, 18.0, PI / 2.0, 0.8, 0.0),
680 (Occultsaurok, _) => (7.0, -3.5, 18.0, PI / 2.0, 0.8, 0.0),
681 (Mindflayer, _) => (7.0, -9.0, 13.0, PI / 2.0, 0.8, 0.0),
682 _ => (17.0, 7.5, 2.0, PI / 2.0, 0.8, 0.0),
683 },
684 stc: match (body.species, body.body_type) {
685 (Ogre, Female) => (-10.0, 7.0, -23.0, -0.3, 0.15, 0.0),
686 (Occultsaurok, _) => (-10.0, 7.0, -22.0, -0.3, 0.15, 0.0),
687 (Mindflayer, _) => (-10.0, 12.5, -22.0, -0.3, 0.15, 0.0),
688 _ => (-18.0, 1.0, -2.0, -0.3, 0.15, 0.0),
689 },
690 bhl: match (body.species, body.body_type) {
691 (Slysaurok, _) => (-1.0, -12.0, 1.0, PI / 2.0, 0.0, 0.0),
692 _ => (3.0, 2.5, 0.0, 1.2, -0.6, -0.3),
693 },
694 bhr: match (body.species, body.body_type) {
695 (Slysaurok, _) => (0.0, -6.0, -2.0, PI / 2.0, 0.0, 0.0),
696 _ => (5.9, 5.5, -5.0, 1.2, -0.6, -0.3),
697 },
698 bc: match (body.species, body.body_type) {
699 (Slysaurok, _) => (1.0, 13.0, -8.0, 0.0, 1.2, -0.6),
700 _ => (-7.0, 3.0, -8.0, 0.0, 0.0, 0.0),
701 },
702 beast: matches!((body.species, body.body_type), (Werewolf, _)),
703 float: matches!(
704 (body.species, body.body_type),
705 (Mindflayer, _) | (Cursekeeper, _)
706 ),
707 height: comp::Body::BipedLarge(*body).dimensions().z,
708 }
709 }
710}
711
712fn mount_point(body: &Body) -> Vec3<f32> {
713 use comp::biped_large::{BodyType::*, Species::*};
714 match (body.species, body.body_type) {
715 (Ogre, Female) => (0.5, 0.0, 0.5),
716 (Ogre, Male) => (-1.0, -3.0, 2.5),
717 (Cyclops, _) => (0.0, 3.0, 1.0),
718 (Wendigo, _) => (0.0, -1.5, 0.5),
719 (Cavetroll, _) => (0.0, 1.0, 4.0),
720 (Mountaintroll, _) => (0.0, 3.5, 2.5),
721 (Swamptroll, _) => (0.0, 0.0, 3.5),
722 (Dullahan, _) => (0.0, -3.0, 4.0),
723 (Werewolf, _) => (-0.5, 0.0, 0.0),
724 (Occultsaurok, _) => (0.0, -1.0, 5.0),
725 (Mightysaurok, _) => (0.0, -1.0, 4.0),
726 (Slysaurok, _) => (0.0, -1.0, 4.0),
727 (Mindflayer, _) => (1.0, 1.5, 1.0),
728 (Minotaur, _) => (0.0, 1.0, 1.5),
729 (Tidalwarrior, _) => (0.0, -2.0, 10.5),
730 (Yeti, _) => (0.0, 2.0, 4.5),
731 (Harvester, _) => (0.5, 2.0, 2.0),
732 (Blueoni, _) => (0.5, 1.0, 4.0),
733 (Redoni, _) => (0.5, 1.0, 4.0),
734 (Cultistwarlord, _) => (-2.5, 3.0, 0.0),
735 (Cultistwarlock, _) => (0.0, 2.0, 2.0),
736 (Huskbrute, _) => (0.0, 1.0, 4.0),
737 (Tursus, _) => (0.0, 2.0, 4.0),
738 (Gigasfrost, _) => (1.0, 2.0, 4.5),
739 (AdletElder, _) => (1.0, 0.0, -1.0),
740 (SeaBishop, _) => (0.0, 0.0, 1.0),
741 (HaniwaGeneral, _) => (0.0, 0.0, 0.0),
742 (TerracottaBesieger, _) => (-1.5, -4.5, 4.0),
743 (TerracottaDemolisher, _) => (-0.5, -3.5, -1.0),
744 (TerracottaPunisher, _) => (-0.5, -3.5, -1.0),
745 (TerracottaPursuer, _) => (-0.5, -3.5, -1.0),
746 (Cursekeeper, _) => (0.5, 0.0, -1.0),
747 (Forgemaster, _) => (1.0, 2.0, 5.0),
748 (Strigoi, _) => (0.0, 0.0, 2.0),
749 (Executioner, _) => (0.0, 0.0, 0.0),
750 }
751 .into()
752}
753
754pub fn init_biped_large_alpha(
755 next: &mut BipedLargeSkeleton,
756 s_a: &SkeletonAttr,
757 speed: f32,
758 acc_vel: f32,
759 move1: f32,
760) -> f32 {
761 let lab: f32 = 0.65 * s_a.tempo;
762 let speednorm = (speed / 12.0).powf(0.4);
763 let foothoril = (acc_vel * lab + PI * 1.45).sin() * speednorm;
764 let foothorir = (acc_vel * lab + PI * (0.45)).sin() * speednorm;
765 let footrotl = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 1.4).sin()).powi(2))).sqrt())
766 * ((acc_vel * lab + PI * 1.4).sin());
767
768 let footrotr = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 0.4).sin()).powi(2))).sqrt())
769 * ((acc_vel * lab + PI * 0.4).sin());
770 next.second.position = Vec3::new(0.0, 0.0, 0.0);
771 next.second.orientation = Quaternion::rotation_x(0.0);
772 next.shoulder_l.position = Vec3::new(
773 -s_a.shoulder.0,
774 s_a.shoulder.1,
775 s_a.shoulder.2 - foothorir * 1.0,
776 );
777 next.shoulder_l.orientation =
778 Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm);
779
780 next.shoulder_r.position = Vec3::new(
781 s_a.shoulder.0,
782 s_a.shoulder.1,
783 s_a.shoulder.2 - foothoril * 1.0,
784 );
785 next.shoulder_r.orientation =
786 Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm);
787
788 next.main.position = Vec3::new(0.0, 0.0, 0.0);
789 next.main.orientation = Quaternion::rotation_x(0.0);
790
791 next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip.0);
792 next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip.0);
793
794 next.hand_l.orientation = Quaternion::rotation_x(0.0);
795 next.hand_r.orientation = Quaternion::rotation_x(0.0);
796
797 foothorir
798}
799
800pub fn init_biped_large_beta(
801 next: &mut BipedLargeSkeleton,
802 s_a: &SkeletonAttr,
803 speed: f32,
804 acc_vel: f32,
805 move1: f32,
806) {
807 let lab: f32 = 0.65 * s_a.tempo;
808 let speednorm = (speed / 12.0).powf(0.4);
809 let foothoril = (acc_vel * lab + PI * 1.45).sin() * speednorm;
810 let foothorir = (acc_vel * lab + PI * (0.45)).sin() * speednorm;
811 let footrotl = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 1.4).sin()).powi(2))).sqrt())
812 * ((acc_vel * lab + PI * 1.4).sin());
813
814 let footrotr = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 0.4).sin()).powi(2))).sqrt())
815 * ((acc_vel * lab + PI * 0.4).sin());
816
817 next.shoulder_l.position = Vec3::new(
818 -s_a.shoulder.0,
819 s_a.shoulder.1,
820 s_a.shoulder.2 - foothorir * 1.0,
821 );
822 next.shoulder_l.orientation =
823 Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotr * -0.2) * speednorm);
824
825 next.shoulder_r.position = Vec3::new(
826 s_a.shoulder.0,
827 s_a.shoulder.1,
828 s_a.shoulder.2 - foothoril * 1.0,
829 );
830 next.shoulder_r.orientation =
831 Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2) * speednorm);
832 next.torso.orientation = Quaternion::rotation_z(0.0);
833
834 next.main.position = Vec3::new(0.0, 0.0, 0.0);
835 next.main.orientation = Quaternion::rotation_x(0.0);
836
837 next.hand_l.position = Vec3::new(0.0, 0.0, s_a.grip.0);
838 next.hand_r.position = Vec3::new(0.0, 0.0, s_a.grip.0);
839
840 next.hand_l.orientation = Quaternion::rotation_x(0.0);
841 next.hand_r.orientation = Quaternion::rotation_x(0.0);
842}
843
844pub fn biped_large_alpha_hammer(
845 next: &mut BipedLargeSkeleton,
846 s_a: &SkeletonAttr,
847 move1: f32,
848 move2: f32,
849) {
850 next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
851 next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
852
853 next.control.position = Vec3::new(
854 4.0 + move1 * -12.0 + move2 * 20.0,
855 (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
856 (-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 8.0,
857 );
858 next.head.orientation =
859 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
860 next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.2 + move2 * -0.4);
861 next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.2 + move2 * 0.2);
862
863 next.control_l.orientation =
864 Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
865 next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
866 * Quaternion::rotation_y(0.0)
867 * Quaternion::rotation_z(0.0);
868
869 next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
870 * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
871 * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
872}
873
874pub fn biped_large_beta_hammer(
875 next: &mut BipedLargeSkeleton,
876 s_a: &SkeletonAttr,
877 move1: f32,
878 move2: f32,
879) {
880 next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
881 next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
882
883 next.control.position = Vec3::new(
884 4.0 + move1 * -12.0 + move2 * 20.0,
885 (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
886 (-s_a.grip.0 / 0.8) + move1 * 6.0 + move2 * 8.0,
887 );
888 next.head.orientation =
889 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
890 next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6 + move2 * -1.5);
891 next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6 + move2 * 1.5);
892
893 next.control_l.orientation =
894 Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
895 next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
896 * Quaternion::rotation_y(0.0)
897 * Quaternion::rotation_z(0.0);
898
899 next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -1.5 + move2 * -0.3)
900 * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
901 * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
902}
903
904pub fn biped_large_alpha_sword(
905 next: &mut BipedLargeSkeleton,
906 s_a: &SkeletonAttr,
907 move1: f32,
908 move2: f32,
909) {
910 next.control_l.position = Vec3::new(-1.0, 1.0, 1.0);
911 next.control_r.position = Vec3::new(0.0, 2.0, -3.0);
912 next.head.orientation =
913 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
914 next.control.position = Vec3::new(
915 -3.0 + move1 * -4.0 + move2 * 5.0,
916 5.0 + s_a.grip.0 / 1.2 + move1 * -4.0 + move2 * 8.0,
917 -4.0 + -s_a.grip.0 / 2.0 + move2 * -5.0,
918 );
919 next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.5 + move2 * -0.7);
920 next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.5 + move2 * 0.7);
921 next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5)
922 * Quaternion::rotation_y(-0.2);
923 next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5)
924 * Quaternion::rotation_y(0.2)
925 * Quaternion::rotation_z(0.0);
926
927 next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -2.0)
928 * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0);
929}
930
931pub fn biped_large_beta_sword(
932 next: &mut BipedLargeSkeleton,
933 s_a: &SkeletonAttr,
934 move1base: f32,
935 move1: f32,
936 move2: f32,
937) {
938 next.control_l.position = Vec3::new(-1.0, 1.0, 1.0);
939 next.control_r.position = Vec3::new(0.0, 2.0, -3.0);
940 next.head.orientation =
941 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
942 next.control.position = Vec3::new(
943 -3.0 + move1 * -4.0 + move2 * 5.0,
944 5.0 + s_a.grip.0 / 1.2 + move1 * -4.0 + move2 * 8.0,
945 -4.0 + -s_a.grip.0 / 2.0 + move2 * -5.0,
946 );
947 next.upper_torso.orientation = Quaternion::rotation_z(move1base * 0.5 + move2 * -0.7);
948 next.lower_torso.orientation = Quaternion::rotation_z(move1base * -0.5 + move2 * 0.7);
949 next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1 * -0.5 + move2 * 1.5)
950 * Quaternion::rotation_y(-0.2);
951 next.control_r.orientation = Quaternion::rotation_x(PI / 2.2 + move1 * -0.5 + move2 * 1.5)
952 * Quaternion::rotation_y(0.2)
953 * Quaternion::rotation_z(0.0);
954
955 next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -1.5)
956 * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0);
957}
958
959pub fn biped_large_alpha_axe(
960 next: &mut BipedLargeSkeleton,
961 s_a: &SkeletonAttr,
962 move1: f32,
963 move2: f32,
964) {
965 next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
966 next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
967
968 next.control.position = Vec3::new(
969 4.0 + move1 * -12.0 + move2 * 28.0,
970 (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * -5.0,
971 (-s_a.grip.0 / 0.8) + move1 * 2.0 + move2 * 8.0,
972 );
973 next.head.orientation =
974 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
975 next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6 + move2 * -0.9);
976 next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6 + move2 * 0.9);
977
978 next.control_l.orientation =
979 Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
980 next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
981 * Quaternion::rotation_y(0.0)
982 * Quaternion::rotation_z(0.0);
983
984 next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
985 * Quaternion::rotation_y(-1.8 + move1 * -0.4 + move2 * 3.5)
986 * Quaternion::rotation_z(move1 * -1.0 + move2 * -1.5);
987}
988
989pub fn biped_large_beta_axe(
990 next: &mut BipedLargeSkeleton,
991 s_a: &SkeletonAttr,
992 move1: f32,
993 move2: f32,
994) {
995 next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
996 next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
997
998 next.control.position = Vec3::new(
999 4.0 + move1 * -18.0 + move2 * 20.0,
1000 (s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 12.0,
1001 (-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 4.0,
1002 );
1003 next.head.orientation =
1004 Quaternion::rotation_x(move1 * -0.25) * Quaternion::rotation_z(move1 * -0.9 + move2 * 0.6);
1005 next.upper_torso.orientation = Quaternion::rotation_z(move1 * 1.2 + move2 * -1.0);
1006 next.lower_torso.orientation = Quaternion::rotation_z(move1 * -1.2 + move2 * 1.0);
1007
1008 next.control_l.orientation =
1009 Quaternion::rotation_x(PI / 2.0 + move2 * 0.8) * Quaternion::rotation_y(-0.0);
1010 next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
1011 * Quaternion::rotation_y(0.0)
1012 * Quaternion::rotation_z(0.0);
1013
1014 next.control.orientation = Quaternion::rotation_x(-1.0 + move1 * 0.0 + move2 * -0.8)
1015 * Quaternion::rotation_y(-1.8 + move1 * 3.0 + move2 * -0.9)
1016 * Quaternion::rotation_z(move1 * -0.2 + move2 * -1.5);
1017}