Adds camera animation button

This commit is contained in:
Mark Hoekveen
2020-03-23 00:52:13 +01:00
parent e9ecc97e5e
commit 075b55fa0b
4 changed files with 80 additions and 12 deletions
+9
View File
@@ -0,0 +1,9 @@
extends AnimationPlayer
func _ready():
pass
func _on_Scan_pressed():
play("Zoom in")
+70 -8
View File
@@ -1,6 +1,6 @@
[gd_scene load_steps=9 format=2] [gd_scene load_steps=12 format=2]
[ext_resource path="res://homunculus3.glb" type="PackedScene" id=1] [ext_resource path="res://AnimationPlayer.gd" type="Script" id=1]
[ext_resource path="res://RecombinationTest.gd" type="Script" id=2] [ext_resource path="res://RecombinationTest.gd" type="Script" id=2]
[ext_resource path="res://homunculus3.tscn" type="PackedScene" id=3] [ext_resource path="res://homunculus3.tscn" type="PackedScene" id=3]
@@ -24,6 +24,41 @@ metallic = 1.0
metallic_specular = 0.59 metallic_specular = 0.59
roughness = 0.45 roughness = 0.45
[sub_resource type="AnimationNodeAnimation" id=7]
[sub_resource type="Animation" id=8]
resource_name = "Zoom in"
length = 6.0
tracks/0/type = "transform"
tracks/0/path = NodePath("AnimationPlayer/Camera2")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = PoolRealArray( -0.00999999, 1, -3.99468, 2.55107, -1.74613e-07, -0.0922959, -0.701057, -0.0922959, 0.701057, 1, 1, 1, 1.52, 1, 0, 2.551, -4, 2.12654e-08, 0.991445, 0.130526, -1.61527e-07, 1, 1, 1, 3.02, 1, 4, 2.551, 0, -0.092296, 0.701057, 0.0922959, 0.701057, 1, 1, 1, 4.52, 1, 0, 2.551, 4, -0.130526, 0, 0, 0.991445, 1, 1, 1, 5.99, 1, -3.99468, 2.55107, -1.74613e-07, -0.0922959, -0.701057, -0.0922959, 0.701057, 1, 1, 1 )
tracks/1/type = "value"
tracks/1/path = NodePath("AnimationPlayer/Camera2:fov")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 3, 6, 18.3 ),
"transitions": PoolRealArray( 1.36604, 0.25, 0.329877, 1 ),
"update": 0,
"values": [ 13.2, 89.2, 11.7, 71.8 ]
}
[sub_resource type="GIProbeData" id=6]
bounds = AABB( -3, -3, -3, 6, 6, 6 )
cell_size = 0.046875
to_cell_xform = Transform( 21.3333, 0, 0, 0, 21.3333, 0, 0, 0, 21.3333, 64, 64, 64 )
dynamic_data = PoolIntArray( 0, 8, 128, 128, 128, 1, 0, 0, 0, 0, 0, 1065353216, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 8355711, 0 )
dynamic_range = 4
bias = 1.5
normal_bias = 0.0
propagation = 0.7
[node name="RecombinationStation" type="Spatial"] [node name="RecombinationStation" type="Spatial"]
[node name="WorldEnvironment" type="WorldEnvironment" parent="."] [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
@@ -40,12 +75,16 @@ material/0 = SubResource( 5 )
script = ExtResource( 2 ) script = ExtResource( 2 )
Creature = ExtResource( 3 ) Creature = ExtResource( 3 )
[node name="homunculus3" parent="Pedestal" instance=ExtResource( 1 )] [node name="AnimationTree" type="AnimationTree" parent="."]
transform = Transform( -1.62921e-08, 0, -0.1, 0, 0.1, 0, 0.1, 0, -1.62921e-08, -0.105591, 1.05245, 0 ) tree_root = SubResource( 7 )
visible = false anim_player = NodePath("../AnimationPlayer")
[node name="Camera" type="Camera" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
transform = Transform( -4.37114e-08, 0.258819, -0.965926, 0, 0.965926, 0.258819, 1, 1.13133e-08, -4.2222e-08, -3.99468, 2.55107, -1.74613e-07 ) "anims/Zoom in" = SubResource( 8 )
script = ExtResource( 1 )
[node name="Camera2" type="Camera" parent="AnimationPlayer"]
transform = Transform( -0.0102665, 0.258805, -0.965875, 1.49012e-08, 0.965926, 0.258819, 0.999947, 0.00265716, -0.00991678, -3.96857, 2.55107, -0.0261439 )
fov = 13.2 fov = 13.2
[node name="GUI" type="Control" parent="."] [node name="GUI" type="Control" parent="."]
@@ -63,8 +102,31 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="Scan" type="Button" parent="GUI"]
margin_top = 80.0
margin_right = 287.0
margin_bottom = 147.0
text = "Scan"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="OmniLight" type="OmniLight" parent="."] [node name="OmniLight" type="OmniLight" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.08659, 2.72793, 0 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.78642, 2.96626, 0 )
light_energy = 0.27
light_indirect_energy = 13.87
omni_range = 48.7 omni_range = 48.7
omni_attenuation = 1.93187 omni_attenuation = 1.93187
[node name="OmniLight2" type="OmniLight" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.647011, 2.71, 0 )
light_energy = 0.27
light_indirect_energy = 13.87
omni_range = 48.7
omni_attenuation = 1.93187
[node name="GIProbe" type="GIProbe" parent="."]
extents = Vector3( 3, 3, 3 )
data = SubResource( 6 )
[connection signal="pressed" from="GUI/Respawn" to="Pedestal" method="_on_Respawn_pressed"] [connection signal="pressed" from="GUI/Respawn" to="Pedestal" method="_on_Respawn_pressed"]
[connection signal="pressed" from="GUI/Scan" to="AnimationPlayer" method="_on_Scan_pressed"]
+1 -1
View File
@@ -14,7 +14,7 @@ const TRAITS = {
const TIERS_STRING = "12 3 1 23 12 3 4 51 2 3 4 1 " const TIERS_STRING = "12 3 1 23 12 3 4 51 2 3 4 1 "
const TRAIT_STRING = "Arm Leg Head Skin Penis" const TRAIT_STRING = "Arm Leg Head Skin Penis"
const SKIN_COLORS = [ const SKIN_COLORS = [
Color("#000000"), Color("#666666"),
Color("#ff0000"), Color("#ff0000"),
Color("#0000ff"), Color("#0000ff"),
Color("#ffff00"), Color("#ffff00"),
-3
View File
@@ -18,9 +18,6 @@ material/0 = SubResource( 1 )
[node name="DongBigDick" parent="Homunculus" index="0"] [node name="DongBigDick" parent="Homunculus" index="0"]
visible = false visible = false
[node name="Eyes" parent="Homunculus" index="1"]
visible = false
[node name="ForeheadHorns" parent="Homunculus" index="2"] [node name="ForeheadHorns" parent="Homunculus" index="2"]
visible = false visible = false