update with new animation fly

This commit is contained in:
AleaJactaEst 2022-02-06 16:02:02 +01:00
parent bbdad2716b
commit 4abc38c26a
4 changed files with 104 additions and 94 deletions

View file

@ -70,7 +70,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -78.3165, 1.80831, -3.74854)
[node name="Nage non implémentée" parent="labels/Red - Important/RedPoint" instance=ExtResource( "7_5rpqq" )]
modulate = Color(1, 0.192157, 0.156863, 1)
text = "Nage non implémentée"
text = "Nage implémentée"
[node name="panel" parent="." instance=ExtResource( "3_gwb04" )]
transform = Transform3D(-0.866025, 0, 0.5, 0, 1, 0, -0.5, 0, -0.866025, -13.6829, 0, -4.71)

View file

@ -5,83 +5,81 @@
[node name="character" instance=ExtResource( "1_fjis3" )]
[node name="Skeleton3D" parent="char_grp/rig" index="0"]
bones/2/position = Vector3(0.00407177, -0.0180859, 1.38914)
bones/3/rotation = Quaternion(-0.0448341, 0.0624973, -0.000411609, 0.997037)
bones/5/position = Vector3(-0.256241, -0.0418741, 1.08255)
bones/5/rotation = Quaternion(-0.26177, -0.382127, 0.371268, 0.804745)
bones/6/rotation = Quaternion(1.51467e-07, -0.215527, 2.25716e-07, 0.976498)
bones/10/position = Vector3(-0.000396625, 0.00809578, 0.902186)
bones/10/rotation = Quaternion(0.00180305, -0.707375, -0.706836, 0.000303701)
bones/11/rotation = Quaternion(-0.0936648, -0.00497171, 0.00136136, 0.995591)
bones/12/rotation = Quaternion(0.0689904, -0.00412458, 0.00403508, 0.997599)
bones/16/rotation = Quaternion(-0.574226, 0.340638, 0.418446, 0.615738)
bones/17/rotation = Quaternion(-0.378989, -0.0319197, 0.20132, 0.902673)
bones/21/rotation = Quaternion(-0.568769, -0.328266, -0.416039, 0.629011)
bones/23/rotation = Quaternion(-0.44584, 0.0343989, -0.215081, 0.868207)
bones/26/rotation = Quaternion(0.123201, 0.0156984, 0.0200964, 0.992054)
bones/35/rotation = Quaternion(0.0807925, -0.0700964, -0.0654902, 0.992104)
bones/36/rotation = Quaternion(-0.02155, 0.0803869, 0.27999, 0.956389)
bones/38/rotation = Quaternion(0.463976, 0.508906, -0.532801, 0.491795)
bones/39/rotation = Quaternion(0.00476773, 0.990549, 0.137074, 0.000502088)
bones/40/rotation = Quaternion(0.0825578, -3.54794e-08, -0.0541637, 0.995113)
bones/46/rotation = Quaternion(0.0647532, 0.129198, 0.0645207, 0.987395)
bones/47/rotation = Quaternion(0.0274556, -0.0768932, -0.279487, 0.956672)
bones/49/rotation = Quaternion(0.458732, -0.491458, 0.541602, 0.504679)
bones/50/rotation = Quaternion(0.00478255, -0.989861, -0.141956, 0.00060893)
bones/51/rotation = Quaternion(0.0726512, -2.5983e-08, 0.0556586, 0.995803)
bones/54/position = Vector3(0.281549, -0.0487599, 1.0975)
bones/54/rotation = Quaternion(-0.147928, 0.384031, -0.428682, 0.804282)
bones/55/rotation = Quaternion(-0.0102621, 0.176619, 0.10336, 0.978783)
bones/58/rotation = Quaternion(-0.518811, 0.00389665, -0.050737, 0.853373)
bones/61/rotation = Quaternion(-0.738731, -0.00514035, -0.0889755, 0.668082)
bones/63/rotation = Quaternion(-0.361437, -0.00374395, -0.0429833, 0.931398)
bones/66/rotation = Quaternion(-0.529858, 0.013541, -0.0370261, 0.84717)
bones/69/rotation = Quaternion(-0.867408, 0.00480594, -0.104109, 0.486561)
bones/71/rotation = Quaternion(-0.31543, -0.00821208, -0.0376922, 0.948165)
bones/74/rotation = Quaternion(-0.543921, -0.0226605, -0.0667541, 0.83617)
bones/77/rotation = Quaternion(-0.709067, -0.000717317, -0.0852429, 0.69997)
bones/79/rotation = Quaternion(-0.286901, -0.00130803, -0.0343219, 0.957344)
bones/82/rotation = Quaternion(-0.00956703, 0.0586081, -0.0195978, 0.998042)
bones/85/rotation = Quaternion(-0.35345, -0.0534357, -0.00977995, 0.933875)
bones/87/rotation = Quaternion(-0.259073, -0.0387697, -0.0205425, 0.964861)
bones/90/rotation = Quaternion(-0.485285, 0.00225873, -0.056711, 0.872512)
bones/93/rotation = Quaternion(-0.734857, 9.95074e-05, -0.0883049, 0.672449)
bones/95/rotation = Quaternion(-0.472039, -0.00690726, -0.0566684, 0.879727)
bones/96/position = Vector3(0.122851, 0.114901, 0.466064)
bones/96/rotation = Quaternion(-0.486571, 0.454878, -0.64043, 0.382341)
bones/97/rotation = Quaternion(-2.74922e-10, -4.84194e-06, 3.52337e-08, 1)
bones/101/position = Vector3(0.281549, -0.0487599, 1.0975)
bones/101/rotation = Quaternion(-0.147928, 0.384031, -0.428682, 0.804282)
bones/104/rotation = Quaternion(-2.94379e-07, 0.191427, -2.638e-07, 0.981507)
bones/106/position = Vector3(-0.186465, -0.0439812, 1.18356)
bones/106/rotation = Quaternion(-0.364262, -0.287041, 0.598247, 0.653469)
bones/109/position = Vector3(0.0857569, 0.0535657, 0.671869)
bones/109/rotation = Quaternion(-0.290112, 0.620684, -0.524904, 0.505037)
bones/112/position = Vector3(-0.130028, 0.110153, 0.466014)
bones/112/rotation = Quaternion(-0.519983, -0.438659, 0.605904, 0.412403)
bones/115/rotation = Quaternion(1.003e-08, 0.0118216, -2.42504e-08, 0.99993)
bones/117/position = Vector3(-0.256241, -0.0418741, 1.08255)
bones/117/rotation = Quaternion(-0.261771, -0.382127, 0.371268, 0.804745)
bones/118/rotation = Quaternion(-0.0186074, -0.210723, -0.0560092, 0.975763)
bones/121/rotation = Quaternion(0.059443, -0.0516931, 0.208846, 0.97477)
bones/124/rotation = Quaternion(-0.293449, 0.00621229, -0.0174822, 0.955795)
bones/126/rotation = Quaternion(-0.280197, 0.0363715, -0.0183202, 0.959078)
bones/129/rotation = Quaternion(-0.268588, 0.00581904, 0.0479072, 0.962046)
bones/132/rotation = Quaternion(-0.749869, 0.00521996, 0.0894379, 0.655493)
bones/134/rotation = Quaternion(-0.342823, 0.00204885, 0.0411884, 0.938495)
bones/137/rotation = Quaternion(-0.459955, 0.0156231, 0.0857961, 0.883649)
bones/140/rotation = Quaternion(-0.558477, 0.0198131, 0.0366705, 0.828472)
bones/142/rotation = Quaternion(-0.325961, 0.00475511, 0.0387496, 0.944577)
bones/145/rotation = Quaternion(-0.237806, 0.00343965, 0.0366949, 0.970613)
bones/148/rotation = Quaternion(-0.667003, -0.0036963, 0.0792733, 0.740816)
bones/150/rotation = Quaternion(-0.324657, 0.00842652, 0.0384143, 0.945014)
bones/153/rotation = Quaternion(-0.366455, 0.0183562, 0.0532902, 0.928726)
bones/156/rotation = Quaternion(-0.630892, 0.000638898, 0.0751048, 0.772227)
bones/158/rotation = Quaternion(-0.282967, 0.000678817, 0.0337299, 0.958536)
bones/159/position = Vector3(-0.0897278, 0.0511641, 0.671672)
bones/159/rotation = Quaternion(-0.315993, -0.586415, 0.514309, 0.54014)
bones/162/position = Vector3(0.199882, -0.0479143, 1.18909)
bones/162/rotation = Quaternion(-0.259727, 0.320276, -0.659829, 0.628164)
bones/2/position = Vector3(-0.0168953, 0.508946, 0.0291032)
bones/3/rotation = Quaternion(0.0770252, 0.0061187, -0.0212199, 0.996785)
bones/5/position = Vector3(-0.338156, 0.447438, -0.124041)
bones/5/rotation = Quaternion(-0.307262, -0.314094, -0.387365, 0.810484)
bones/6/rotation = Quaternion(-1.33212e-07, 0.587936, 2.74967e-07, 0.808907)
bones/10/position = Vector3(0.00813095, 0.0408708, -0.108271)
bones/10/rotation = Quaternion(-0.0316695, 0.99443, 0.0903084, 0.0441596)
bones/11/rotation = Quaternion(-0.0554995, 0.082172, -0.0341149, 0.994487)
bones/12/rotation = Quaternion(-0.00305444, 0.025317, 0.0780189, 0.996626)
bones/16/rotation = Quaternion(-0.556256, 0.383694, 0.301203, 0.672781)
bones/17/rotation = Quaternion(-0.141952, 0.0631606, 0.424369, 0.89206)
bones/21/rotation = Quaternion(-0.545859, -0.416195, -0.418758, 0.594526)
bones/23/rotation = Quaternion(-0.0614123, -0.0911368, -0.507933, 0.854358)
bones/26/rotation = Quaternion(-0.092396, -0.012508, -0.016474, 0.995508)
bones/35/rotation = Quaternion(0.213681, -0.169249, -0.44672, 0.852136)
bones/36/rotation = Quaternion(0.0247409, -0.037012, 0.820981, 0.569217)
bones/38/rotation = Quaternion(0.453842, 0.608797, -0.453608, 0.466513)
bones/39/rotation = Quaternion(0.00476178, 0.990816, 0.135133, 0.000459045)
bones/40/rotation = Quaternion(0.296613, -3.00156e-08, -0.396533, 0.868782)
bones/46/rotation = Quaternion(0.108501, 0.138792, 0.458381, 0.871121)
bones/47/rotation = Quaternion(0.0456323, -0.0606414, -0.827615, 0.556142)
bones/49/rotation = Quaternion(0.280632, -0.521484, 0.48779, 0.641374)
bones/51/rotation = Quaternion(0.179271, -2.5339e-08, 0.4356, 0.882108)
bones/54/position = Vector3(0.312623, 0.437755, -0.109832)
bones/54/rotation = Quaternion(-0.337628, 0.316336, 0.395958, 0.793194)
bones/55/rotation = Quaternion(0.220858, -0.415893, -0.0365474, 0.88143)
bones/58/rotation = Quaternion(-0.178058, -0.000701349, -0.0247728, 0.983708)
bones/61/rotation = Quaternion(-0.102877, -0.00071574, -0.0123909, 0.994617)
bones/63/rotation = Quaternion(-0.0472496, -0.000244748, -0.00575957, 0.998866)
bones/66/rotation = Quaternion(-0.234863, 0.000405445, -0.0293189, 0.971586)
bones/69/rotation = Quaternion(-0.0621532, 0.000344386, -0.00745976, 0.998039)
bones/71/rotation = Quaternion(-0.0202359, -0.000526936, -0.00241824, 0.999792)
bones/74/rotation = Quaternion(-0.118501, -0.00204265, -0.00167214, 0.99295)
bones/77/rotation = Quaternion(-0.0608605, -6.15146e-05, -0.00731642, 0.998119)
bones/79/rotation = Quaternion(-0.0215469, -0.000118847, -0.0025894, 0.999765)
bones/82/rotation = Quaternion(-0.045812, 0.0774554, -0.0426766, 0.995028)
bones/85/rotation = Quaternion(-0.341894, -0.0505131, -0.00712847, 0.938353)
bones/87/rotation = Quaternion(-0.112437, -0.0105561, -0.016501, 0.993466)
bones/90/rotation = Quaternion(-0.226489, 0.0119206, 0.0152102, 0.973822)
bones/93/rotation = Quaternion(-0.0421871, 5.92849e-06, -0.00505668, 0.999097)
bones/95/rotation = Quaternion(-0.00828159, -0.000121388, -0.000993767, 0.999965)
bones/96/position = Vector3(0.26788, -0.0799248, -0.461465)
bones/96/rotation = Quaternion(0.495633, 0.199817, 0.813215, 0.230442)
bones/97/rotation = Quaternion(8.85872e-08, 0.0024306, -5.89807e-10, 0.999997)
bones/101/position = Vector3(0.312623, 0.437755, -0.109832)
bones/101/rotation = Quaternion(-0.337628, 0.316336, 0.395958, 0.793194)
bones/104/rotation = Quaternion(-2.57163e-07, -0.424214, -1.98708e-07, 0.905562)
bones/106/position = Vector3(-0.23823, 0.429048, -0.0548472)
bones/106/rotation = Quaternion(-0.431817, 0.089361, 0.488602, 0.752872)
bones/109/position = Vector3(0.162602, -0.0317358, -0.27701)
bones/109/rotation = Quaternion(-0.381183, 0.322201, -0.682154, 0.53437)
bones/112/position = Vector3(-0.253918, -0.103652, -0.463478)
bones/112/rotation = Quaternion(0.433082, -0.134603, -0.846937, 0.277523)
bones/115/rotation = Quaternion(-1.31103e-07, 0.048314, 5.07712e-08, 0.998832)
bones/117/position = Vector3(-0.338156, 0.447438, -0.124041)
bones/117/rotation = Quaternion(-0.307262, -0.314094, -0.387365, 0.810484)
bones/118/rotation = Quaternion(0.1203, 0.584517, 0.0686503, 0.799472)
bones/121/rotation = Quaternion(-0.0553657, 0.093504, 0.059485, 0.992297)
bones/124/rotation = Quaternion(-0.130073, 0.0138176, -0.00793818, 0.991376)
bones/126/rotation = Quaternion(0.0566031, -0.00251201, 0.0386277, 0.997646)
bones/129/rotation = Quaternion(0.000190053, -0.00104534, 0.00800264, 0.999968)
bones/132/rotation = Quaternion(-0.0190412, 0.000132444, 0.00227098, 0.999816)
bones/134/rotation = Quaternion(-0.0647147, 0.000386823, 0.00777492, 0.997873)
bones/137/rotation = Quaternion(0.00235471, -0.00315775, 0.0401739, 0.999185)
bones/140/rotation = Quaternion(-0.0165778, 0.0003923, -0.0339278, 0.999287)
bones/142/rotation = Quaternion(-0.0201405, 0.000293718, 0.00239391, 0.999794)
bones/145/rotation = Quaternion(-0.0346762, 0.00433396, 0.039094, 0.998624)
bones/148/rotation = Quaternion(-8.86981e-05, -4.99268e-07, 1.03173e-05, 1)
bones/150/rotation = Quaternion(-0.00112873, 2.94077e-05, 0.000133846, 0.999999)
bones/153/rotation = Quaternion(-0.0254682, -0.00272336, 0.00153101, 0.999671)
bones/156/rotation = Quaternion(-0.000252583, 2.31054e-07, 2.96366e-05, 1)
bones/159/position = Vector3(-0.147036, -0.0462964, -0.282602)
bones/159/rotation = Quaternion(-0.381505, -0.31016, 0.697233, 0.521652)
bones/162/position = Vector3(0.20413, 0.430834, -0.0524523)
bones/162/rotation = Quaternion(-0.438851, -0.149045, -0.528447, 0.711294)
[node name="AnimationPlayer" parent="." index="1"]
autoplay = "CHAR_idle_bored"

View file

@ -55,14 +55,14 @@ var anim_strafe_right_walk:String = "CHAR_strafe_right_walk"
var anim_walk:String = "CHAR_walk"
var anim_walk_backward:String = "CHAR_walk_backward"
var anim_fly_idle:String = "CHAR_sitting_ground_idle"
var anim_fly_run:String = "CHAR_sitting_ground_idle"
var anim_fly_run_backward:String = "CHAR_sitting_ground_idle"
var anim_fly_sitting_ground_idle:String = "CHAR_sitting_ground_idle"
var anim_fly_strafe_left_walk:String = "CHAR_sitting_ground_idle"
var anim_fly_strafe_right_walk:String = "CHAR_sitting_ground_idle"
var anim_fly_walk:String = "CHAR_sitting_ground_idle"
var anim_fly_walk_backward:String = "CHAR_sitting_ground_idle"
var anim_fly_idle:String = "CHAR_fly"
var anim_fly_run:String = "CHAR_fly"
var anim_fly_run_backward:String = "CHAR_fly"
var anim_fly_sitting_ground_idle:String = "CHAR_fly_idle"
var anim_fly_strafe_left_walk:String = "CHAR_fly"
var anim_fly_strafe_right_walk:String = "CHAR_fly"
var anim_fly_walk:String = "CHAR_fly"
var anim_fly_walk_backward:String = "CHAR_fly"
var anim_swim_idle:String = "CHAR_swim_idle"
var anim_swim_run:String = "CHAR_swim_slow"
@ -89,20 +89,28 @@ func switch_state(new_state):
state_player = new_state
match state_player:
StatePlayer.WALK_WATER:
print("switch camera WALK_WATER")
$carpet.hide()
print("switch camera WALK (WALK_WATER)")
#$carpet.hide()
camera_fps.rotate_x( -player_rotate_x )
player_rotate_x = 0
camera_fps = $camera_root/Camera3D_FPS_WALK
StatePlayer.WALK:
print("switch camera WALK")
$carpet.hide()
#$carpet.hide()
camera_fps.rotate_x( -player_rotate_x )
player_rotate_x = 0
camera_fps = $camera_root/Camera3D_FPS_WALK
StatePlayer.FLY:
print("switch camera FLY")
$carpet.show()
#$carpet.show()
camera_fps.rotate_x( -player_rotate_x )
player_rotate_x = 0
camera_fps = $camera_root/Camera3D_FPS_FLY
StatePlayer.SWIM:
print("switch camera SWIM")
$carpet.hide()
#$carpet.hide()
camera_fps.rotate_x( -player_rotate_x )
player_rotate_x = 0
camera_fps = $camera_root/Camera3D_FPS_SWIM
@ -824,10 +832,8 @@ func enter_underwater():
# function called by Area3D (Water Object)
level_water = get_position().y
switch_state(StatePlayer.WALK_WATER)
print("SWIM")
func exit_underwater():
# function called by Area3D (Water Object)
switch_state(StatePlayer.WALK)
print("WALK")

View file

@ -32,9 +32,15 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.55554, 0)
[node name="Camera3D_TPS" type="Camera3D" parent="camera_root/horizontal_root/vertical_root"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, -2.14563)
[node name="Camera3D_FPS" type="Camera3D" parent="camera_root"]
[node name="Camera3D_FPS_WALK" type="Camera3D" parent="camera_root"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.56633, 0.222061)
[node name="Camera3D_FPS_FLY" type="Camera3D" parent="camera_root"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.09195, 0.571561)
[node name="Camera3D_FPS_SWIM" type="Camera3D" parent="camera_root"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.148843, 0.633556)
[node name="carpet" type="MeshInstance3D" parent="."]
visible = false
mesh = SubResource( "PlaneMesh_mwqg4" )