change angle specification for rotation* commands to degrees

This commit is contained in:
yuni 2024-05-01 21:25:33 +02:00
parent 632d1b02c9
commit fc017dcd43
2 changed files with 42 additions and 46 deletions

View file

@ -331,7 +331,7 @@ pub fn load_defs(
}
["rotationx", rotation_x] => {
if let Ok(rotation_x_float) = rotation_x.parse::<f32>() {
state.rotation *= Quat::from_rotation_x(PI * rotation_x_float);
state.rotation *= Quat::from_rotation_x(rotation_x_float.to_radians());
}
else {
error!("Can't parse float: {line}");
@ -340,7 +340,7 @@ pub fn load_defs(
}
["rotationy", rotation_y] => {
if let Ok(rotation_y_float) = rotation_y.parse::<f32>() {
state.rotation *= Quat::from_rotation_y(PI * rotation_y_float);
state.rotation *= Quat::from_rotation_y(rotation_y_float.to_radians());
}
else {
error!("Can't parse float: {line}");
@ -349,7 +349,7 @@ pub fn load_defs(
}
["rotationz", rotation_z] => {
if let Ok(rotation_z_float) = rotation_z.parse::<f32>() {
state.rotation *= Quat::from_rotation_z(PI * rotation_z_float);
state.rotation *= Quat::from_rotation_z(rotation_z_float.to_radians());
}
else {
error!("Can't parse float: {line}");

View file

@ -11,11 +11,11 @@ actor 0 0 0
sphere yes
physics off
scale 2439.7e3
rotationx -0.50
rotationx -90
orbitaround sol 57.91e9
actor 0 0 0 orbitring
scale 57.91e9
rotationz 0.0353
rotationz 6.35
only_in_map_at_dist 1e10 jupiter
clickable no
physics off
@ -25,11 +25,11 @@ actor 0 0 0
sphere yes
physics off
scale 6051.8e3
rotationx -0.50
rotationx -90
orbitaround sol 108.21e9
actor 0 0 0 orbitring
scale 108.21e9
rotationz 0.0119
rotationz 2.15
only_in_map_at_dist 1e10 jupiter
clickable no
physics off
@ -39,11 +39,11 @@ actor 0 0 0
sphere yes
physics off
scale 6371e3
rotationx -0.50
rotationx -90
orbitaround sol 149.598023e9
actor 0 0 0 orbitring
scale 149.598023e9
rotationz 0.0088
rotationz 1.57869
only_in_map_at_dist 1e10 jupiter
clickable no
physics off
@ -53,11 +53,11 @@ actor 0 0 0
sphere yes
physics off
scale 3389.5e3
rotationx -0.50
rotationx -90
orbitaround sol 227.939366e9
actor 0 0 0 orbitring
scale 227.939366e9
rotationz 0.0091
rotationz 1.65
only_in_map_at_dist 1e10 jupiter
clickable no
physics off
@ -71,8 +71,8 @@ actor 0 0 0
sphere yes
ring yes
physics off
rotationx -0.50
rotationz -0.28
rotationx -90
rotationz -50
angularmomentum 30 30 30
actor 0 0 0 orbitring
scale 778.479e9
@ -141,8 +141,7 @@ actor 0 0 0
relativeto jupiter
orbitaround jupiter 421700e3
scale 1822e3
rotationy -0.40
rotationx -0.50
rotationx -90
angularmomentum 0 0.0001 0
sphere yes
moon yes
@ -159,8 +158,7 @@ actor 0 0 0
relativeto jupiter
orbitaround jupiter 670900e3
scale 1561e3
rotationy 0.20
rotationx -0.50
rotationx -90
angularmomentum 0 0.0001 0
sphere yes
moon yes
@ -177,8 +175,7 @@ actor 0 0 0
relativeto jupiter
orbitaround jupiter 1070400e3
scale 2634e3
rotationy -0.40
rotationx -0.50
rotationx -90
angularmomentum 0 0.0001 0
sphere yes
moon yes
@ -195,8 +192,7 @@ actor 0 0 0
relativeto jupiter
orbitaround jupiter 1882700e3
scale 2410e3
rotationy -0.40
rotationx -0.50
rotationx -90
angularmomentum 0 0.0001 0
sphere yes
moon yes
@ -213,11 +209,11 @@ actor 0 0 0
sphere yes
physics off
scale 58232e3
rotationx -0.50
rotationx -90
orbitaround sol 1433.53e9
actor 0 0 0 orbitring
scale 1433.53e9
rotationz 0.0052
rotationz 0.93
only_in_map_at_dist 1e10 jupiter
clickable no
physics off
@ -227,11 +223,11 @@ actor 0 0 0
sphere yes
physics off
scale 25362e3
rotationx -0.50
rotationx -90
orbitaround sol 2870.972e9
actor 0 0 0 orbitring
scale 2870.972e9
rotationz 0.0055
rotationz 1
only_in_map_at_dist 1e10 jupiter
clickable no
physics off
@ -241,11 +237,11 @@ actor 0 0 0
sphere yes
physics off
scale 24622e3
rotationx -0.50
rotationx -90
orbitaround sol 4500e9
actor 0 0 0 orbitring
scale 4500e9
rotationz 0.0041
rotationz 0.74
only_in_map_at_dist 1e10 jupiter
clickable no
physics off
@ -254,7 +250,7 @@ actor 0 0 0
orbitaround sol 5906.38e9
actor 0 0 0 orbitring
scale 5906.38e9
rotationz 0.0953
rotationz 15.55
only_in_map_at_dist 1e10 jupiter
clickable no
physics off
@ -271,7 +267,7 @@ actor 0 593051 0 suitv2
health 0.3
angularmomentum 0 0 0
thrust 1.2 1 1 14 1.5
rotationy 0.75
rotationy 135
engine monopropellant
actor 10 -30 20 MeteorAceGT
@ -295,7 +291,7 @@ actor -55e3 44e3 0 suitv2
density 200
collider handcrafted
thrust 1.2 1 1 20 1.5
rotationx 1
rotationx 180
engine monopropellant
wants maxrotation 0
wants maxvelocity 0
@ -339,8 +335,8 @@ actor 13200 300 -3000 hollow_asteroid
wants maxrotation 0
wants maxvelocity 0
angularmomentum 0 0 0
rotationy 0.3
rotationx 1.5
rotationy 54
rotationx -90
pronoun she
actor 6 11 4 lightorb
relativeto cultasteroid
@ -363,7 +359,7 @@ actor -8200 -4400 -8100 asteroid_lum
collider mesh
density 10000000000
scale 300
rotationy 0.82
rotationy 147
angularmomentum 0 0.015 0
actor 70 30 30 lightorb
relativeto Lum
@ -379,7 +375,7 @@ actor -200 -110 1000 satellite
wants maxvelocity 0
thrust 0.05 0.05 0.05 30 1
collider mesh
rotationy 0.5
rotationy 90
angularmomentum 0 0 0
density 0.01
@ -388,7 +384,7 @@ actor 1000 20 300 monolith
relativeto player
scale 2
density 300
rotationx 0.5
rotationx 90
wants maxrotation 0.01
angularmomentum 0.0 0.0 0.01
thrust 0 0 0 30 1
@ -399,7 +395,7 @@ actor 10000 2000 -3500 monolith
relativeto player
scale 2
density 300
rotationx 0.5
rotationx 90
wants maxrotation 0.01
angularmomentum 0.0 0.0 0.01
thrust 0 0 0 30 1
@ -410,7 +406,7 @@ actor -8000 -1000 -100 monolith
relativeto player
scale 2
density 300
rotationx 0.5
rotationx 90
wants maxrotation 0.01
angularmomentum 0.0 0.0 0.01
thrust 0 0 0 30 1
@ -423,7 +419,7 @@ actor -3300 10 0 pizzeria
scale 40
pointofinterest yes
collider mesh
rotationy 0.30
rotationy 54
angularmomentum 0 0 0
actor -120 0 20 MeteorAceGT
name "MeteorAceGT™"
@ -443,7 +439,7 @@ actor -3300 10 0 pizzeria
scale 20
collider mesh
density 200
rotationy 0.45
rotationy 81
angularmomentum 0 0 0
light "FF00B3" 30000000
actor -52 -10 0 lightorb
@ -464,7 +460,7 @@ actor -3300 10 0 pizzeria
wants maxrotation 0
wants maxvelocity 0
thrust 15 6 3 400 0.5
rotationy -0.7
rotationy -126
scale 3
chatid SubduedClippy
pronoun it
@ -479,7 +475,7 @@ actor -3300 10 0 pizzeria
thrust 1.2 1 1 20 1.5
wants maxrotation 0
wants maxvelocity 0
rotationy -0.5
rotationy -90
angularmomentum 0 0 0
pronoun he
@ -491,8 +487,8 @@ actor 30 -12 -40 suitv2
alive yes
collider handcrafted
angularmomentum 0.4 0.2 0.1
rotationy 0.6
rotationx 1
rotationy 108
rotationx 180
pointofinterest yes
thrust 1.2 1 1 20 1.5
wants maxrotation 0.5
@ -539,7 +535,7 @@ actor 100 -18000 2000 clippy
wants maxvelocity 0
thrust 15 6 3 400 0.5
pointofinterest yes
rotationy -0.5
rotationy -90
scale 3
chatid ClippyTransSerenity
pronoun it
@ -690,7 +686,7 @@ actor -184971e3 149410e3 -134273e3 clippy
wants maxvelocity 0
thrust 15 6 3 400 0.5
pointofinterest yes
rotationy -0.5
rotationy -90
scale 3
chatid ClippyTransFarview
pronoun it
@ -834,7 +830,7 @@ actor 0 -44e3 0 clippy
wants maxvelocity 0
thrust 15 6 3 400 0.5
pointofinterest yes
rotationy -0.5
rotationy -90
scale 3
chatid ClippyTransMetis
pronoun it