Ajout de l'angle d'ouverture des coffres.

This commit is contained in:
osquallo 2019-05-01 19:36:46 +02:00
parent 9407e238d5
commit 6dcc968c25
11 changed files with 83 additions and 21 deletions

View file

@ -5,4 +5,3 @@
[resource]
background_mode = 2
background_sky = SubResource( 1 )

View file

@ -0,0 +1,14 @@
tool
extends Spatial
export( Color ) var color = Color( 1.0, 1.0, 1.0, 1.0 ) setget set_color
func set_color( value ):
color = value
$container_bottom/container_bottom.get_surface_material( 0 ).albedo_color = self.color
$container_lid/container_lid.get_surface_material( 0 ).albedo_color = self.color
export( float ) var lid_angle = 0.0 setget set_lid_angle
func set_lid_angle( value ):
lid_angle = value
$container_lid.rotation_degrees = Vector3( -lid_angle, 0.0, 0.0 )

View file

@ -1,12 +1,13 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=4 format=2]
[ext_resource path="res://meshes/props/travel_box/container_bottom.tscn" type="PackedScene" id=1]
[ext_resource path="res://meshes/props/travel_box/container_lid.tscn" type="PackedScene" id=2]
[ext_resource path="res://meshes/props/travel_box/container.gd" type="Script" id=3]
[node name="container" type="Spatial"]
script = ExtResource( 3 )
[node name="container_bottom" parent="." instance=ExtResource( 1 )]
[node name="container_lid" parent="." instance=ExtResource( 2 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.001, 0.389, -0.381 )

View file

@ -1,14 +1,48 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=14 format=2]
[ext_resource path="res://meshes/props/travel_box/travel_box_bottom.escn" type="PackedScene" id=1]
[ext_resource path="res://materials/tilables/base_plastic_soft.material" type="Material" id=2]
[ext_resource path="res://materials/tilables/base_plastic_hard_shiny.material" type="Material" id=3]
[ext_resource path="res://materials/tilables/base_steel_glossy.material" type="Material" id=4]
[ext_resource path="res://materials/tilables/textures/base_plastic_soft_roughness.png" type="Texture" id=2]
[ext_resource path="res://materials/tilables/textures/base_plastic_soft_colorRange.png" type="Texture" id=3]
[ext_resource path="res://materials/tilables/textures/base_plastic_soft_normal.png" type="Texture" id=4]
[ext_resource path="res://materials/tilables/textures/base_steel_glossy_roughness.png" type="Texture" id=5]
[ext_resource path="res://materials/tilables/textures/base_plastic_hard_shiny_colorRange.png" type="Texture" id=6]
[ext_resource path="res://materials/tilables/textures/base_plastic_hard_shiny_roughness.png" type="Texture" id=7]
[ext_resource path="res://materials/tilables/textures/base_plastic_hard_shiny_normal.png" type="Texture" id=8]
[ext_resource path="res://materials/tilables/textures/base_steel_glossy_basecolor.png" type="Texture" id=9]
[ext_resource path="res://materials/tilables/textures/base_steel_glossy_normal.png" type="Texture" id=10]
[node name="container_bottom" index="0" instance=ExtResource( 1 )]
[sub_resource type="SpatialMaterial" id=1]
resource_local_to_scene = true
resource_name = "base_plastic_soft"
albedo_texture = ExtResource( 3 )
roughness_texture = ExtResource( 2 )
normal_enabled = true
normal_scale = 1.0
normal_texture = ExtResource( 4 )
[sub_resource type="SpatialMaterial" id=2]
resource_local_to_scene = true
resource_name = "base_plastic_hard_shiny"
albedo_color = Color( 0.219608, 0.278431, 0.321569, 1 )
albedo_texture = ExtResource( 6 )
roughness_texture = ExtResource( 7 )
normal_enabled = true
normal_scale = 1.0
normal_texture = ExtResource( 8 )
uv1_triplanar = true
[sub_resource type="SpatialMaterial" id=3]
resource_local_to_scene = true
albedo_texture = ExtResource( 9 )
metallic = 1.0
roughness_texture = ExtResource( 5 )
normal_enabled = true
normal_scale = 1.0
normal_texture = ExtResource( 10 )
[node name="container_bottom" instance=ExtResource( 1 )]
[node name="container_bottom" parent="." index="0"]
material/0 = ExtResource( 2 )
material/1 = ExtResource( 3 )
material/2 = ExtResource( 4 )
material/0 = SubResource( 1 )
material/1 = SubResource( 2 )
material/2 = SubResource( 3 )

View file

@ -5,11 +5,10 @@
[ext_resource path="res://materials/tilables/base_plastic_hard_shiny.material" type="Material" id=3]
[ext_resource path="res://materials/tilables/base_steel_glossy.material" type="Material" id=4]
[node name="container_lid" index="0" instance=ExtResource( 1 )]
[node name="container_lid" instance=ExtResource( 1 )]
[node name="container_lid" parent="." index="0"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
material/0 = ExtResource( 2 )
material/1 = ExtResource( 3 )
material/2 = ExtResource( 4 )

View file

@ -1,10 +1,10 @@
[gd_scene load_steps=13 format=2]
[ext_resource path="res://previewer/previewer.gd" type="Script" id=1]
[ext_resource path="res://previewer/dummy/dummy.tscn" type="PackedScene" id=2]
[ext_resource path="res://meshes/props/pendo_teddy/pendo_teddy.tscn" type="PackedScene" id=2]
[ext_resource path="res://materials/tilables/textures/base_UV_check_big.png" type="Texture" id=3]
[ext_resource path="res://meshes/props/pendo_teddy/pendo_teddy.tscn" type="PackedScene" id=4]
[ext_resource path="res://meshes/props/travel_box/container.tscn" type="PackedScene" id=5]
[ext_resource path="res://meshes/props/travel_box/container.tscn" type="PackedScene" id=4]
[ext_resource path="res://previewer/dummy/dummy.tscn" type="PackedScene" id=5]
[ext_resource path="res://meshes/props/reference_box/reference_box.tscn" type="PackedScene" id=6]
[ext_resource path="res://meshes/props/fountain_suzanha/Fountain_suzanha.tscn" type="PackedScene" id=7]
@ -40,7 +40,7 @@ script = ExtResource( 1 )
[node name="world_environment" type="WorldEnvironment" parent="."]
environment = SubResource( 2 )
[node name="dummy" parent="." instance=ExtResource( 2 )]
[node name="dummy" parent="." instance=ExtResource( 5 )]
[node name="terrain" type="Spatial" parent="."]
@ -50,11 +50,27 @@ mesh = SubResource( 4 )
[node name="props" type="Spatial" parent="."]
[node name="pendo_teddy" parent="props" instance=ExtResource( 4 )]
[node name="pendo_teddy" parent="props" instance=ExtResource( 2 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -3 )
[node name="container" parent="props" instance=ExtResource( 5 )]
[node name="container" parent="props" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -5 )
color = Color( 0.145098, 0.0980392, 0.713726, 1 )
lid_angle = 45.0
[node name="container_2" parent="props" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.24144, 0, -5 )
color = Color( 0.491686, 0.159256, 0.832031, 1 )
lid_angle = 90.0
[node name="container_3" parent="props" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.6614, 0, -5 )
color = Color( 0.360784, 1, 0, 1 )
lid_angle = 12.0
[node name="container_4" parent="props" instance=ExtResource( 4 )]
transform = Transform( 0.457191, 0, 0.889369, 0, 1, 0, -0.889369, 0, 0.457191, -3.94754, 4.76837e-07, -4.27729 )
color = Color( 0.972549, 0.196078, 0.0431373, 1 )
[node name="reference_box" parent="props" instance=ExtResource( 6 )]
@ -71,4 +87,3 @@ shadow_enabled = true
[node name="gi_probe" type="GIProbe" parent="light_system"]
extents = Vector3( 63.192, 10, 76.3229 )
data = SubResource( 5 )