1use super::{
2 super::{Animation, vek::*},
3 BipedLargeSkeleton, SkeletonAttr, init_gigas_fire,
4};
5use common::{
6 comp::item::{AbilitySpec, ToolKind},
7 states::utils::StageSection,
8};
9use core::f32::consts::PI;
10
11pub struct BeamAnimation;
12
13impl Animation for BeamAnimation {
14 type Dependency<'a> = (
15 Option<ToolKind>,
16 (Option<ToolKind>, Option<&'a AbilitySpec>),
17 f32,
18 Vec3<f32>,
19 Option<StageSection>,
20 f32,
21 f32,
22 Option<&'a str>,
23 );
24 type Skeleton = BipedLargeSkeleton;
25
26 #[cfg(feature = "use-dyn-lib")]
27 const UPDATE_FN: &'static [u8] = b"biped_large_beam\0";
28
29 #[cfg_attr(feature = "be-dyn-lib", unsafe(export_name = "biped_large_beam"))]
30 fn update_skeleton_inner(
31 skeleton: &Self::Skeleton,
32 (
33 active_tool_kind,
34 _second_tool_kind,
35 global_time,
36 velocity,
37 stage_section,
38 acc_vel,
39 timer,
40 ability_id,
41 ): Self::Dependency<'_>,
42 anim_time: f32,
43 rate: &mut f32,
44 s_a: &SkeletonAttr,
45 ) -> Self::Skeleton {
46 *rate = 1.0;
47 let mut next = (*skeleton).clone();
48
49 let speed = Vec2::<f32>::from(velocity).magnitude();
50
51 let lab: f32 = 0.65 * s_a.tempo;
52 let speednorm = (speed / 12.0).powf(0.4);
53 let foothoril = (acc_vel * lab + PI * 1.45).sin() * speednorm;
54 let foothorir = (acc_vel * lab + PI * (0.45)).sin() * speednorm;
55 let footrotl = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 1.4).sin()).powi(2))).sqrt())
56 * ((acc_vel * lab + PI * 1.4).sin())
57 * speednorm;
58
59 let footrotr = ((1.0 / (0.5 + (0.5) * ((acc_vel * lab + PI * 0.4).sin()).powi(2))).sqrt())
60 * ((acc_vel * lab + PI * 0.4).sin())
61 * speednorm;
62 let subtract = global_time - timer;
63 let check = subtract - subtract.trunc();
64 let _mirror = (check - 0.5).signum();
65 next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
66 next.jaw.orientation = Quaternion::rotation_x(0.0);
67
68 next.main.position = Vec3::new(0.0, 0.0, 0.0);
69 next.main.orientation = Quaternion::rotation_x(0.0);
70
71 next.hand_l.position = Vec3::new(s_a.grip.1, 0.0, s_a.grip.0);
72 next.hand_r.position = Vec3::new(-s_a.grip.1, 0.0, s_a.grip.0);
73
74 next.hand_l.orientation = Quaternion::rotation_x(0.0);
75 next.hand_r.orientation = Quaternion::rotation_x(0.0);
76 let (move1base, move2shake, move2base, move3) = match stage_section {
77 Some(StageSection::Buildup) => ((anim_time.powf(0.25)).min(1.0), 0.0, 0.0, 0.0),
78 Some(StageSection::Action) => (
79 1.0,
80 (anim_time * 15.0 + PI).sin(),
81 (anim_time.powf(0.1)).min(1.0),
82 0.0,
83 ),
84 Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time),
85 _ => (0.0, 0.0, 0.0, 0.0),
86 };
87 let pullback = 1.0 - move3;
88 let move1 = move1base * pullback;
89 let move2 = move2base * pullback;
90 match active_tool_kind {
91 Some(ToolKind::Staff) => {
92 next.control_l.position = Vec3::new(-1.0, 3.0, 12.0);
93 next.control_r.position =
94 Vec3::new(1.0 + move1 * 5.0, 2.0 + move1 * 1.0, 2.0 + move1 * 14.0);
95
96 next.control.position = Vec3::new(
97 -3.0 + move1 * -5.0,
98 3.0 + s_a.grip.0 / 1.2 + move1 * 3.0 + move2shake * 1.0,
99 -11.0 + -s_a.grip.0 / 2.0 + move1 * -2.0,
100 );
101 next.head.orientation =
102 Quaternion::rotation_x(move1 * -0.2) * Quaternion::rotation_y(move1 * 0.2);
103 next.jaw.orientation = Quaternion::rotation_x(0.0);
104
105 next.control_l.orientation =
106 Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.5);
107 next.control_r.orientation = Quaternion::rotation_x(PI / 2.5 + move1 * 0.4)
108 * Quaternion::rotation_y(0.5)
109 * Quaternion::rotation_z(move1 * 1.2 + move2shake * 0.5);
110
111 next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * -0.1)
112 * Quaternion::rotation_y(-0.1 + move1 * 0.6);
113 next.shoulder_l.position = Vec3::new(
114 -s_a.shoulder.0,
115 s_a.shoulder.1,
116 s_a.shoulder.2 - foothorir * 1.0,
117 );
118 next.shoulder_l.orientation =
119 Quaternion::rotation_x(move1 * 0.2 + 0.3 + 0.8 * speednorm + (footrotr * -0.2));
120 next.shoulder_r.position = Vec3::new(
121 s_a.shoulder.0,
122 s_a.shoulder.1,
123 s_a.shoulder.2 - foothoril * 1.0,
124 );
125 next.shoulder_r.orientation =
126 Quaternion::rotation_x(move1 * 0.2 + 0.3 + 0.6 * speednorm + (footrotl * -0.2));
127 },
128 Some(ToolKind::Sceptre) => match ability_id {
129 Some("common.abilities.custom.sea_bishop.longbeam") => {
130 next.control_l.position = Vec3::new(-1.0, 3.0, 12.0);
131 next.control_r.position =
132 Vec3::new(-1.0 + move1 * 5.0, 2.0 + move1 * 1.0, 2.0 + move1 * 14.0);
133
134 next.control.position = Vec3::new(
135 -3.0 + move1 * -5.0,
136 -2.0 + s_a.grip.0 / 1.2 + move1 * 3.0 + move2shake * 1.0,
137 -11.0 + -s_a.grip.0 / 2.0 + move1 * -2.0,
138 );
139 next.head.orientation =
140 Quaternion::rotation_x(move1 * -0.2) * Quaternion::rotation_y(move1 * 0.2);
141 next.jaw.orientation = Quaternion::rotation_x(0.0);
142
143 next.control_l.orientation =
144 Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.5);
145 next.control_r.orientation = Quaternion::rotation_x(PI / 2.5 + move1 * 0.4)
146 * Quaternion::rotation_y(0.5)
147 * Quaternion::rotation_z(move1 * 1.2 + move2shake * 0.5);
148
149 next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * -0.1)
150 * Quaternion::rotation_y(-0.1 + move1 * 0.6);
151 next.shoulder_l.position = Vec3::new(
152 -s_a.shoulder.0,
153 s_a.shoulder.1,
154 s_a.shoulder.2 - foothorir * 1.0,
155 );
156 next.shoulder_l.orientation = Quaternion::rotation_x(
157 move1 * 0.2 + 0.3 + 0.8 * speednorm + (footrotr * -0.2),
158 );
159 next.shoulder_r.position = Vec3::new(
160 s_a.shoulder.0,
161 s_a.shoulder.1,
162 s_a.shoulder.2 - foothoril * 1.0,
163 );
164 next.shoulder_r.orientation = Quaternion::rotation_x(
165 move1 * 0.2 + 0.3 + 0.6 * speednorm + (footrotl * -0.2),
166 );
167 },
168 _ => {
169 next.control_l.position = Vec3::new(-1.0, 3.0, 12.0);
170 next.control_r.position =
171 Vec3::new(1.0 + move1 * 5.0, 2.0 + move1 * 1.0, 2.0 + move1 * 14.0);
172
173 next.control.position = Vec3::new(
174 -3.0 + move1 * -5.0,
175 3.0 + s_a.grip.0 / 1.2 + move1 * 3.0 + move2shake * 1.0,
176 -11.0 + -s_a.grip.0 / 2.0 + move1 * -2.0,
177 );
178 next.head.orientation =
179 Quaternion::rotation_x(move1 * -0.2) * Quaternion::rotation_y(move1 * 0.2);
180 next.jaw.orientation = Quaternion::rotation_x(0.0);
181
182 next.control_l.orientation =
183 Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.5);
184 next.control_r.orientation = Quaternion::rotation_x(PI / 2.5 + move1 * 0.4)
185 * Quaternion::rotation_y(0.5)
186 * Quaternion::rotation_z(move1 * 1.2 + move2shake * 0.5);
187
188 next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * -0.1)
189 * Quaternion::rotation_y(-0.1 + move1 * 0.6);
190 next.shoulder_l.position = Vec3::new(
191 -s_a.shoulder.0,
192 s_a.shoulder.1,
193 s_a.shoulder.2 - foothorir * 1.0,
194 );
195 next.shoulder_l.orientation = Quaternion::rotation_x(
196 move1 * 0.2 + 0.3 + 0.8 * speednorm + (footrotr * -0.2),
197 );
198 next.shoulder_r.position = Vec3::new(
199 s_a.shoulder.0,
200 s_a.shoulder.1,
201 s_a.shoulder.2 - foothoril * 1.0,
202 );
203 next.shoulder_r.orientation = Quaternion::rotation_x(
204 move1 * 0.2 + 0.3 + 0.6 * speednorm + (footrotl * -0.2),
205 );
206 },
207 },
208 Some(ToolKind::Sword) => match ability_id {
209 Some("common.abilities.custom.gigas_fire.overheat") => {
210 let (move1base, _, move3) = match stage_section {
211 Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
212 Some(StageSection::Action) => (1.0, 0.0, 0.0),
213 Some(StageSection::Recover) => (1.0, 1.0, anim_time),
214 _ => (0.0, 0.0, 0.0),
215 };
216 let (move1base, move2base) = if move1base < 0.5 {
217 (2.0 * move1base, 0.0)
218 } else {
219 (1.0, (2.0 * (move1base - 0.5)).powi(3))
220 };
221 let pullback = 1.0 - move3;
222 let move1 = move1base * pullback;
223 let move2 = move2base * pullback;
224
225 init_gigas_fire(&mut next);
226
227 next.torso.orientation.rotate_z(-PI / 8.0 * move1base);
228 next.lower_torso.orientation.rotate_z(PI / 16.0 * move1);
229 next.shoulder_l.position += Vec3::new(0.0, 5.0, 0.0) * move1;
230 next.shoulder_l.orientation.rotate_x(PI / 1.8 * move1);
231 next.shoulder_l.orientation.rotate_z(-PI / 4.0 * move1);
232 next.shoulder_r.orientation.rotate_x(PI / 1.8 * move1);
233 next.control.position += Vec3::new(10.0, -5.0, 30.0) * move1base;
234 next.control.orientation.rotate_x(PI / 3.5 * move1);
235 next.control.orientation.rotate_y(PI / 8.0 * move1);
236 next.control_l.orientation.rotate_z(-PI / 4.0 * move1);
237 next.control_l.orientation.rotate_x(PI / 4.0 * move1);
238 next.control_r.orientation.rotate_z(PI / 6.0 * move1);
239 next.foot_r.orientation.rotate_z(-PI / 5.0 * move1base);
240
241 next.torso.position += Vec3::new(0.0, -8.0, 0.0) * move2;
242 next.torso.orientation.rotate_z(PI / 8.0 * move2base);
243 next.torso.orientation.rotate_x(-PI / 10.0 * move2);
244 next.lower_torso.position += Vec3::new(0.0, 0.0, 1.0) * move2;
245 next.lower_torso.orientation.rotate_x(PI / 10.0 * move2);
246 next.shoulder_l.position += Vec3::new(2.0, -3.0, -4.0) * move2;
247 next.shoulder_l.orientation.rotate_x(-PI / 4.0 * move2);
248 next.shoulder_l.orientation.rotate_z(PI / 8.0 * move2);
249 next.shoulder_r.position += Vec3::new(-2.0, 2.0, 4.0) * move2;
250 next.shoulder_r.orientation.rotate_x(-PI / 4.0 * move2);
251 next.shoulder_r.orientation.rotate_y(-PI / 8.0 * move2);
252 next.shoulder_r.orientation.rotate_z(PI / 8.0 * move2);
253 next.control.position += Vec3::new(
254 -10.0 * move2base,
255 5.0 * move2base,
256 -30.0 * move2base - 3.0 * move2,
257 );
258 next.control.orientation.rotate_x(-0.8 * PI * move2);
259 next.control.orientation.rotate_y(PI / 8.0 * move2);
260 next.control.orientation.rotate_z(PI / 8.0 * move2);
261 next.main.orientation.rotate_x(PI / 12.0 * move2);
262 next.control_r.orientation.rotate_x(PI / 4.0 * move2);
263 next.foot_r
264 .orientation
265 .rotate_z(PI / 5.0 * move2base.powi(2));
266 },
267 _ => {},
268 },
269 Some(ToolKind::Hammer) => match ability_id {
270 Some("common.abilities.custom.dwarves.forgemaster.flamethrower") => {
271 next.control_l.position = Vec3::new(-1.0, 3.0, 12.0);
272 next.control_r.position =
273 Vec3::new(-1.0 + move1 * 5.0, 2.0 + move1 * 1.0, 2.0 + move1 * 14.0);
274
275 next.control.position = Vec3::new(
276 -3.0 + move1 * -5.0,
277 -2.0 + s_a.grip.0 / 1.2 + move1 * 3.0 + move2shake * 1.0,
278 -11.0 + -s_a.grip.0 / 2.0 + move1 * -2.0,
279 );
280 next.head.orientation =
281 Quaternion::rotation_x(move1 * -0.2) * Quaternion::rotation_y(move1 * 0.2);
282 next.jaw.orientation = Quaternion::rotation_x(0.0);
283
284 next.control_l.orientation =
285 Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.5);
286 next.control_r.orientation = Quaternion::rotation_x(move1 * 0.4)
287 * Quaternion::rotation_y(0.8)
288 * Quaternion::rotation_z(move1 * 1.2 + move2shake * 0.5);
289
290 next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * -0.1)
291 * Quaternion::rotation_y(-0.1 + move1 * 0.3);
292 next.shoulder_l.position = Vec3::new(
293 -s_a.shoulder.0,
294 s_a.shoulder.1,
295 s_a.shoulder.2 - foothorir * 1.0,
296 );
297 next.shoulder_l.orientation = Quaternion::rotation_x(
298 move1 * 0.2 + 0.3 + 0.8 * speednorm + (footrotr * -0.2),
299 );
300 next.shoulder_r.position = Vec3::new(
301 s_a.shoulder.0,
302 s_a.shoulder.1,
303 s_a.shoulder.2 - foothoril * 1.0,
304 );
305 next.shoulder_r.orientation = Quaternion::rotation_x(
306 move1 * 0.2 + 0.3 + 0.6 * speednorm + (footrotl * -0.2),
307 );
308 },
309 _ => {
310 next.control_l.position = Vec3::new(-1.0, 3.0, 12.0);
311 next.control_r.position =
312 Vec3::new(1.0 + move1 * 5.0, 2.0 + move1 * 1.0, 2.0 + move1 * 14.0);
313
314 next.control.position = Vec3::new(
315 -3.0 + move1 * -5.0,
316 3.0 + s_a.grip.0 / 1.2 + move1 * 3.0 + move2shake * 1.0,
317 -11.0 + -s_a.grip.0 / 2.0 + move1 * -2.0,
318 );
319 next.head.orientation =
320 Quaternion::rotation_x(move1 * -0.2) * Quaternion::rotation_y(move1 * 0.2);
321 next.jaw.orientation = Quaternion::rotation_x(0.0);
322
323 next.control_l.orientation =
324 Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.5);
325 next.control_r.orientation = Quaternion::rotation_x(PI / 2.5 + move1 * 0.4)
326 * Quaternion::rotation_y(0.5)
327 * Quaternion::rotation_z(move1 * 1.2 + move2shake * 0.5);
328
329 next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * -0.1)
330 * Quaternion::rotation_y(-0.1 + move1 * 0.6);
331 next.shoulder_l.position = Vec3::new(
332 -s_a.shoulder.0,
333 s_a.shoulder.1,
334 s_a.shoulder.2 - foothorir * 1.0,
335 );
336 next.shoulder_l.orientation = Quaternion::rotation_x(
337 move1 * 0.2 + 0.3 + 0.8 * speednorm + (footrotr * -0.2),
338 );
339 next.shoulder_r.position = Vec3::new(
340 s_a.shoulder.0,
341 s_a.shoulder.1,
342 s_a.shoulder.2 - foothoril * 1.0,
343 );
344 next.shoulder_r.orientation = Quaternion::rotation_x(
345 move1 * 0.2 + 0.3 + 0.6 * speednorm + (footrotl * -0.2),
346 );
347 },
348 },
349 Some(ToolKind::Natural) => match ability_id {
350 Some("common.abilities.custom.yeti.frostbreath") => {
351 next.second.scale = Vec3::one() * 0.0;
352
353 next.head.orientation =
354 Quaternion::rotation_x(move1 * 0.5 + move2 * -0.5 + move2shake * -0.02);
355 next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
356 next.jaw.orientation = Quaternion::rotation_x(move2 * -0.5 + move2shake * -0.1);
357 next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
358 next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
359 next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
360 next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
361
362 next.weapon_l.position = Vec3::new(-12.0, -1.0, -15.0);
363 next.weapon_r.position = Vec3::new(12.0, -1.0, -15.0);
364
365 next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1);
366 next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1);
367
368 next.arm_control_r.orientation =
369 Quaternion::rotation_x(move1 * 1.1 + move2 * -1.6)
370 * Quaternion::rotation_y(move1 * 1.4 + move2 * -1.8);
371
372 next.shoulder_l.orientation =
373 Quaternion::rotation_x(move1 * 1.4 + move2 * -1.8);
374
375 next.shoulder_r.orientation =
376 Quaternion::rotation_x(move1 * 1.4 + move2 * -1.8);
377
378 next.upper_torso.position = Vec3::new(
379 0.0,
380 s_a.upper_torso.0,
381 s_a.upper_torso.1 + move1 * -1.9 + move2 * 1.2,
382 );
383 next.upper_torso.orientation =
384 Quaternion::rotation_x(move1 * 0.8 + move2 * -1.1 + move2shake * -0.02);
385 next.lower_torso.position =
386 Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1);
387 next.lower_torso.orientation =
388 Quaternion::rotation_x(move1 * -0.8 + move2 * 1.1 + move2shake * 0.02);
389 },
390 Some("common.abilities.custom.harvester.firebreath") => {
391 next.head.orientation =
392 Quaternion::rotation_x(move1 * 0.5 + move2 * -0.4 + move2shake * -0.02);
393
394 next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
395 next.jaw.orientation = Quaternion::rotation_x(move2 * -0.5 + move2shake * -0.1);
396
397 next.upper_torso.position = Vec3::new(
398 0.0,
399 s_a.upper_torso.0 + move1 * -3.0 + move2 * 3.0,
400 s_a.upper_torso.1 + move1 * -0.4,
401 );
402 next.upper_torso.orientation =
403 Quaternion::rotation_x(move1 * 0.8 + move2 * -1.1 + move2shake * -0.02);
404 next.lower_torso.position =
405 Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1);
406 next.lower_torso.orientation =
407 Quaternion::rotation_x(move1 * -0.8 + move2 * 1.1 + move2shake * 0.02);
408
409 next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
410 next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
411
412 next.control.position =
413 Vec3::new(-6.0, 0.0 + s_a.grip.0 / 1.0, -s_a.grip.0 / 0.8);
414
415 next.control_l.orientation =
416 Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_z(PI);
417 next.control_r.orientation =
418 Quaternion::rotation_x(PI / 2.0 + 0.2) * Quaternion::rotation_y(-1.0);
419
420 next.control.orientation =
421 Quaternion::rotation_x(-1.4) * Quaternion::rotation_y(-2.8);
422
423 next.weapon_l.position = Vec3::new(move1 * 8.0, move1 * 1.0, move1 * 6.0);
424 next.weapon_l.orientation =
425 Quaternion::rotation_x(move1 * 0.5) * Quaternion::rotation_y(move1 * -0.8);
426
427 next.shoulder_l.position = Vec3::new(
428 -s_a.shoulder.0,
429 s_a.shoulder.1,
430 s_a.shoulder.2 - foothorir * 1.0,
431 );
432 next.shoulder_l.orientation = Quaternion::rotation_y(-0.4 + move1 * 0.8)
433 * Quaternion::rotation_x(-0.4 + move1 * -0.2);
434 next.shoulder_r.orientation = Quaternion::rotation_y(0.4 + move1 * -0.8)
435 * Quaternion::rotation_x(0.4 + move1 * -0.8);
436
437 next.hand_r.position = Vec3::new(
438 -s_a.grip.1 + move1 * -5.0,
439 0.0 + move1 * 6.0,
440 s_a.grip.0 + move1 * 13.0,
441 );
442 next.hand_r.orientation = Quaternion::rotation_x(move1 * -3.0)
443 * Quaternion::rotation_y(move1 * 1.5)
444 * Quaternion::rotation_z(move1 * -1.5);
445 },
446 _ => {},
447 },
448 Some(ToolKind::Spear) => match ability_id {
449 Some("common.abilities.custom.tidalwarrior.bubbles") => {
450 next.upper_torso.orientation = Quaternion::rotation_x(-0.1);
451 next.jaw.orientation = Quaternion::rotation_x(move1 * -0.6);
452 next.control_l.position = Vec3::new(-1.0, 4.0, 8.0);
453 next.control_r.position = Vec3::new(17.0, 7.0, 2.0);
454
455 next.control.position =
456 Vec3::new(-3.0, 3.0 + s_a.grip.0 / 1.2, -11.0 + -s_a.grip.0 / 2.0);
457
458 next.control_l.orientation =
459 Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.9);
460 next.control_r.orientation = Quaternion::rotation_x(PI / 2.5)
461 * Quaternion::rotation_y(0.2)
462 * Quaternion::rotation_z(0.0);
463
464 next.control.orientation =
465 Quaternion::rotation_x(-0.2) * Quaternion::rotation_y(-0.3);
466 },
467 _ => {
468 next.control_l.position = Vec3::new(-1.0, 3.0, 12.0);
469 next.control_r.position =
470 Vec3::new(1.0 + move1 * 5.0, 2.0 + move1 * 1.0, 2.0 + move1 * 14.0);
471
472 next.control.position = Vec3::new(
473 -3.0 + move1 * -5.0,
474 3.0 + s_a.grip.0 / 1.2 + move1 * 3.0 + move2shake * 1.0,
475 -11.0 + -s_a.grip.0 / 2.0 + move1 * -2.0,
476 );
477 next.head.orientation =
478 Quaternion::rotation_x(move1 * -0.2) * Quaternion::rotation_y(move1 * 0.2);
479 next.jaw.orientation = Quaternion::rotation_x(0.0);
480
481 next.control_l.orientation =
482 Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_y(-0.5);
483 next.control_r.orientation = Quaternion::rotation_x(PI / 2.5 + move1 * 0.4)
484 * Quaternion::rotation_y(0.5)
485 * Quaternion::rotation_z(move1 * 1.2 + move2shake * 0.5);
486
487 next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * -0.1)
488 * Quaternion::rotation_y(-0.1 + move1 * 0.6);
489 next.shoulder_l.position = Vec3::new(
490 -s_a.shoulder.0,
491 s_a.shoulder.1,
492 s_a.shoulder.2 - foothorir * 1.0,
493 );
494 next.shoulder_l.orientation = Quaternion::rotation_x(
495 move1 * 0.2 + 0.3 + 0.8 * speednorm + (footrotr * -0.2),
496 );
497 next.shoulder_r.position = Vec3::new(
498 s_a.shoulder.0,
499 s_a.shoulder.1,
500 s_a.shoulder.2 - foothoril * 1.0,
501 );
502 next.shoulder_r.orientation = Quaternion::rotation_x(
503 move1 * 0.2 + 0.3 + 0.6 * speednorm + (footrotl * -0.2),
504 );
505 },
506 },
507 _ => {},
508 }
509
510 next
511 }
512}