gros nettoyage/renomage/deplacement.

This commit is contained in:
osquallo 2018-08-27 09:33:01 +02:00
parent 2ad93ba6c0
commit ccd332e34d
9 changed files with 586 additions and 2148 deletions

File diff suppressed because it is too large Load diff

View file

@ -20,11 +20,11 @@ const MAX_SLOPE_ANGLE = 40
var MOUSE_SENSITIVITY = 0.05
onready var camera_rotation = $Camera_rotation_helper
onready var camera = $Camera_rotation_helper/Camera
onready var camera_rotation = $camera_rotation_helper
onready var camera = $camera_rotation_helper/camera
onready var player_infos_billboard = $infos_spatial/character_infos_billboard
onready var player_mesh = $MeshInstance
onready var flashlight = $MeshInstance/Flashlight
onready var player_mesh = $mesh_instance
onready var flashlight = $mesh_instance/flashlight
### Caractéristiques du personnage.
var douleur = 0
@ -97,9 +97,9 @@ func process_input(delta):
vel.y = 0
if Input.is_action_pressed( "ui_face_cam" ):
$Camera_rotation_helper/face_camera.make_current()
$camera_rotation_helper/face_camera.make_current()
elif Input.is_action_just_released( "ui_face_cam" ):
$Camera_rotation_helper/Camera.make_current()
$camera_rotation_helper/camera.make_current()
func process_movement(delta):
@ -194,5 +194,5 @@ func show_infos():
########
#### Cameras
func show_third_person_camera():
$Camera_rotation_helper/Camera.make_current()
$camera_rotation_helper/camera.make_current()

View file

@ -1,11 +1,13 @@
[gd_scene load_steps=8 format=2]
[gd_scene load_steps=9 format=2]
[ext_resource path="res://game_scene/Game/Character/Character.gd" type="Script" id=1]
[ext_resource path="res://game_scene/Game/Character/infos_spatial.gd" type="Script" id=2]
[ext_resource path="res://game_scene/character_infos_billboard.tscn" type="PackedScene" id=3]
[ext_resource path="res://assets/test/suzanne/suzanne.obj" type="ArrayMesh" id=4]
[ext_resource path="res://game_scene/suzanne/suzanne_shape_keys.escn" type="PackedScene" id=4]
[ext_resource path="res://game_scene/suzanne/suzanne.obj" type="ArrayMesh" id=5]
[sub_resource type="Shader" id=2]
[sub_resource type="Shader" id=1]
code = "shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx;
@ -44,10 +46,10 @@ void fragment() {
}
"
[sub_resource type="ShaderMaterial" id=3]
[sub_resource type="ShaderMaterial" id=2]
render_priority = 0
shader = SubResource( 2 )
shader = SubResource( 1 )
shader_param/albedo = Color( 1, 1, 1, 1 )
shader_param/specular = 0.5
shader_param/metallic = 0.0
@ -60,13 +62,13 @@ shader_param/uv1_offset = Vector3( 0, 0, 0 )
shader_param/uv2_scale = Vector3( 1, 1, 1 )
shader_param/uv2_offset = Vector3( 0, 0, 0 )
[sub_resource type="SphereShape" id=1]
[sub_resource type="SphereShape" id=3]
radius = 0.520354
[node name="Character" type="KinematicBody" index="0"]
[node name="character" type="KinematicBody" index="0"]
transform = Transform( 0.371345, 0, 0, 0, 0.218854, 0, 0, 0, 0.371345, -0.00167466, -0.475751, 6.02408 )
transform = Transform( 0.371345, 0, 0, 0, 0.218854, 0, 0, 0, 0.371345, -0.00167466, 0.0124722, 6.02408 )
input_ray_pickable = false
input_capture_on_drag = false
collision_layer = 1
@ -83,7 +85,7 @@ _sections_unfolded = [ "Axis Lock", "Transform", "collision" ]
[node name="infos_spatial" type="Spatial" parent="." index="0"]
transform = Transform( 1, 0, 0, 0, 1, 0, -9.56715e-015, 0, 1, -4.65661e-010, 5.47657, 0 )
transform = Transform( 1, 0, 0, 0, 1, 0, -9.56715e-015, 0, 1, -4.65661e-010, 2.47932, -0.0688725 )
script = ExtResource( 2 )
[node name="character_infos_billboard" parent="infos_spatial" index="0" instance=ExtResource( 3 )]
@ -93,11 +95,13 @@ mouse_filter = 2
mouse_default_cursor_shape = 2
_sections_unfolded = [ "Mouse", "Rect", "Size Flags", "Visibility" ]
[node name="Camera_rotation_helper" type="Spatial" parent="." index="1"]
[node name="camera_rotation_helper" type="Spatial" parent="." index="1"]
[node name="Camera" type="Camera" parent="Camera_rotation_helper" index="0"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0730682, 0 )
transform = Transform( 1, 0, 0, 0, 0.972208, 0.397244, 0, -0.137979, 0.972208, 0, 6.00296, 1.22667 )
[node name="camera" type="Camera" parent="camera_rotation_helper" index="0"]
transform = Transform( 1, 0, 0, 0, 0.972209, 0.397244, 0, -0.137979, 0.972208, 0, 2.71489, 0.896517 )
keep_aspect = 1
cull_mask = 1048575
environment = null
@ -112,10 +116,9 @@ near = 0.05
far = 10000.0
_sections_unfolded = [ "Transform" ]
[node name="face_camera" type="Camera" parent="Camera_rotation_helper" index="1"]
[node name="face_camera" type="Camera" parent="camera_rotation_helper" index="1"]
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 0, 5.06689, -2.96733 )
visible = false
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 0, 1.91278, -2.96733 )
keep_aspect = 1
cull_mask = 1048575
environment = null
@ -130,26 +133,13 @@ near = 0.05
far = 10000.0
_sections_unfolded = [ "Transform" ]
[node name="MeshInstance" type="MeshInstance" parent="." index="2"]
[node name="suzanne" type="Spatial" parent="." index="2" instance=ExtResource( 4 )]
transform = Transform( -0.281766, 0, -2.3459e-008, 0, 0.491282, 0, 2.46328e-008, 0, -0.26834, 0.00342001, 4.32337, -0.0753574 )
layers = 1
material_override = null
cast_shadow = 1
extra_cull_margin = 0.0
use_in_baked_light = false
lod_min_distance = 0.0
lod_min_hysteresis = 0.0
lod_max_distance = 0.0
lod_max_hysteresis = 0.0
mesh = ExtResource( 4 )
skeleton = NodePath("..")
material/0 = SubResource( 3 )
_sections_unfolded = [ "Transform", "material" ]
transform = Transform( -0.281766, 0, -2.3459e-008, 0, 0.491282, 0, 2.46328e-008, 0, -0.26834, 8975.45, 1800.77, -6275.94 )
[node name="Flashlight" type="SpotLight" parent="MeshInstance" index="0"]
[node name="flashlight" type="SpotLight" parent="suzanne" index="1"]
transform = Transform( -2.54929, -1.60184e-009, 3.70147e-007, 0, 2.42833, 0.0302507, -2.34015e-007, 0.0192396, -4.44583, -0.0164189, -0.0857301, 1.36415 )
transform = Transform( -2.54929, -1.60184e-009, 3.70147e-007, 0, 2.42833, 0.0302507, -2.34015e-007, 0.0192396, -4.44583, 31854.2, -3661.36, -23387.1 )
layers = 1
light_color = Color( 1, 1, 1, 1 )
light_energy = 2.0
@ -170,10 +160,28 @@ spot_angle = 22.2473
spot_angle_attenuation = 1.0
_sections_unfolded = [ "Light", "Shadow" ]
[node name="collision_shape" type="CollisionShape" parent="." index="3"]
[node name="mesh_instance" type="MeshInstance" parent="." index="3"]
transform = Transform( 0.754381, 0, 0, 0, 0.927224, 0, 0, 0, 0.540596, 0.0063323, 4.35001, -0.0641537 )
shape = SubResource( 1 )
transform = Transform( -0.281766, 0, -2.3459e-008, 0, 0.491282, 0, 2.46328e-008, 0, -0.26834, 0.00342001, 1.72051, -0.0753574 )
visible = false
layers = 1
material_override = null
cast_shadow = 1
extra_cull_margin = 0.0
use_in_baked_light = false
lod_min_distance = 0.0
lod_min_hysteresis = 0.0
lod_max_distance = 0.0
lod_max_hysteresis = 0.0
mesh = ExtResource( 5 )
skeleton = NodePath("..")
material/0 = SubResource( 2 )
_sections_unfolded = [ "Transform", "material" ]
[node name="collision_shape" type="CollisionShape" parent="." index="4"]
transform = Transform( 0.426611, 0, -2.39179e-015, 0, 0.524356, 0, -2.39179e-015, 0, 0.305713, 0.0063323, 1.96086, -0.0823917 )
shape = SubResource( 3 )
disabled = false

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -76,12 +76,14 @@ func show_menu():
$Home.show()
$Settings.hide()
$HUD.modulate.a = 0.5
character.get_node( "infos_spatial/character_infos_billboard" ).modulate.a = 0.5
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
func hide_menu():
$Settings.hide()
$Home.hide()
$Help.show()
$HUD.modulate.a = 1.0
character.get_node( "infos_spatial/character_infos_billboard" ).modulate.a = 1.0
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _on_Settings_font_changed( value ):

View file

@ -66,7 +66,6 @@ _sections_unfolded = [ "Material", "Size Flags", "Visibility" ]
[node name="margin_container" type="MarginContainer" parent="." index="1"]
editor/display_folded = true
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
@ -388,6 +387,7 @@ size_flags_vertical = 1
[node name="sexe_box" type="HBoxContainer" parent="margin_container/v_box_container" index="4"]
editor/display_folded = true
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
@ -597,8 +597,8 @@ mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 0
min_value = 0.5
max_value = 1.5
step = 0.5
max_value = 1.25
step = 0.1
page = 0.0
value = 1.0
exp_edit = false

View file

@ -84,7 +84,7 @@ func _ready():
# self.character_preview.get_node( "Camera_rotation_helper/face_camera" ).make_current()
self.character_preview.get_node( "face_camera" ).make_current()
self.character_mesh = $viewport/character.get_node("MeshInstance")
self.character_mesh = $viewport/character.get_node("mesh_instance")
# self.character_face_camera = $viewport/character/Camera_rotation_helper/face_camera
self.character_box = $margin_container/character_box
self.name_input = self.character_box.get_node( "character_creation_box/margin_container/v_box_container/name_box/line_edit" )

View file

@ -63,13 +63,34 @@ _sections_unfolded = [ "Render Target", "Rendering" ]
[node name="character" parent="viewport" index="0" instance=ExtResource( 2 )]
transform = Transform( 0.371345, 0, 0, 0, 0.218854, 0, 0, 0, 0.371345, 0.000610344, -0.475751, 6.02408 )
transform = Transform( 0.371345, 0, 0, 0, 0.218854, 0, 0, 0, 0.371345, 0.000610344, -0.00217155, 6.02408 )
visible = true
[node name="face_lights" type="Spatial" parent="viewport/character" index="4"]
[node name="face_camera" type="Camera" parent="viewport/character" index="4"]
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 0, 1.94589, -2.44418 )
keep_aspect = 1
cull_mask = 1048575
environment = null
h_offset = 0.0
v_offset = 0.0
doppler_tracking = 0
projection = 1
current = false
fov = 70.0
size = 2.0
near = 0.05
far = 100.0
_sections_unfolded = [ "Transform" ]
[node name="face_lights" type="Spatial" parent="viewport/character" index="5"]
editor/display_folded = true
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.27005, 0 )
[node name="face_light_right" type="OmniLight" parent="viewport/character/face_lights" index="0"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.37718, 6.37492, -2.74363 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.377365, 3.59212, -0.568276 )
layers = 1
light_color = Color( 0.742188, 0.945618, 1, 1 )
light_energy = 0.5
@ -92,7 +113,7 @@ _sections_unfolded = [ "Light" ]
[node name="face_light_left" type="OmniLight" parent="viewport/character/face_lights" index="1"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.69919, 6.37492, -2.74363 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.385559, 3.59212, -0.568276 )
layers = 1
light_color = Color( 0.741176, 0.945098, 1, 1 )
light_energy = 0.5
@ -113,23 +134,6 @@ omni_shadow_mode = 1
omni_shadow_detail = 1
_sections_unfolded = [ "Light" ]
[node name="face_camera" type="Camera" parent="viewport/character" index="5"]
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 0, 5.0457, -2.44418 )
keep_aspect = 1
cull_mask = 1048575
environment = null
h_offset = 0.0
v_offset = 0.0
doppler_tracking = 0
projection = 1
current = false
fov = 70.0
size = 2.0
near = 0.05
far = 100.0
_sections_unfolded = [ "Transform" ]
[node name="texture_rect" type="TextureRect" parent="." index="1"]
anchor_left = 0.0