Previewer: ajout du deplacement verticale sur ctrl+up et ctrl+down.

This commit is contained in:
osquallo 2019-04-26 10:36:37 +02:00
parent 4428fac913
commit a0c4e92ff8
9 changed files with 25 additions and 13 deletions

View file

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

View file

@ -1,14 +1,18 @@
extends Spatial
func _process( delta ):
if Input.is_action_pressed("move_forward"):
if Input.is_action_pressed("move_up"):
$dummy/camera_stand.translate( Vector3( 0.0, 10.0*delta, 0.0 ) )
elif Input.is_action_pressed("move_down"):
$dummy/camera_stand.translate( Vector3( 0.0,-10.0*delta, 0.0 ) )
elif Input.is_action_pressed("move_forward"):
$dummy/camera_stand.translate( Vector3( 0.0, 0.0,-10.0*delta ) )
if Input.is_action_pressed("move_backward"):
elif Input.is_action_pressed("move_backward"):
$dummy/camera_stand.translate( Vector3( 0.0, 0.0, 10.0*delta ) )
if Input.is_action_pressed("move_left"):
elif Input.is_action_pressed("move_left"):
$dummy/camera_stand.translate( Vector3(-10.0*delta, 0.0, 0.0 ) )
if Input.is_action_pressed("move_right"):
elif Input.is_action_pressed("move_right"):
$dummy/camera_stand.translate( Vector3( 10.0*delta, 0.0, 0.0 ) )
func _input(event):

View file

@ -3,9 +3,9 @@
[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://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/reference_box/reference_box.tscn" type="PackedScene" id=6]
[ext_resource path="res://meshes/props/travel_box/container.tscn" type="PackedScene" id=4]
[ext_resource path="res://meshes/props/reference_box/reference_box.tscn" type="PackedScene" id=5]
[ext_resource path="res://meshes/props/pendo_teddy/pendo_teddy.tscn" type="PackedScene" id=6]
[sub_resource type="ProceduralSky" id=1]
@ -49,13 +49,13 @@ 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( 6 )]
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 )
[node name="reference_box" parent="props" instance=ExtResource( 6 )]
[node name="reference_box" parent="props" instance=ExtResource( 5 )]
[node name="light_system" type="Spatial" parent="."]
@ -67,4 +67,3 @@ shadow_enabled = true
[node name="gi_probe" type="GIProbe" parent="light_system"]
extents = Vector3( 63.192, 10, 76.3229 )
data = SubResource( 5 )

View file

@ -56,6 +56,16 @@ move_zoom_out={
"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":5,"pressed":false,"doubleclick":false,"script":null)
]
}
move_up={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
]
}
move_down={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
]
}
[node]