Upgraded project for Godot 3.0
parent
d577f0c35d
commit
06b07be8ea
|
@ -0,0 +1 @@
|
|||
.import/
|
|
@ -27,10 +27,14 @@ func _ready():
|
|||
_max_speed = speed * 10
|
||||
|
||||
|
||||
func get_forward():
|
||||
return get_transform().basis * Vector3(0,0,-1)
|
||||
|
||||
|
||||
func _process(delta):
|
||||
var motor = Vector3(0,0,0)
|
||||
|
||||
var forward = get_transform().basis * Vector3(0,0,-1)
|
||||
var forward = get_forward()
|
||||
var right = get_transform().basis * Vector3(1,0,0)
|
||||
var up = Vector3(0,1,0)
|
||||
|
||||
|
@ -85,9 +89,15 @@ func _input(event):
|
|||
|
||||
# Apply rotations
|
||||
set_rotation(Vector3(0, deg2rad(_yaw), 0))
|
||||
rotate_x(deg2rad(_pitch))
|
||||
rotate(get_transform().basis.x.normalized(), -deg2rad(_pitch))
|
||||
|
||||
elif event.type == InputEvent.KEY:
|
||||
if event.pressed and event.scancode == KEY_ESCAPE:
|
||||
# Get the mouse back
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
if event.pressed:
|
||||
if event.scancode == KEY_ESCAPE:
|
||||
# Get the mouse back
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
|
||||
elif event.scancode == KEY_I:
|
||||
var pos = get_translation()
|
||||
var fw = get_forward()
|
||||
print("Position: ", pos, ", Forward: ", fw)
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
[application]
|
||||
|
||||
name="VoxelMap"
|
||||
main_scene="res://new_scene.tscn"
|
||||
target_fps=60
|
||||
icon="res://icon.png"
|
||||
|
||||
[debug]
|
||||
|
||||
print_fps=false
|
||||
|
||||
[rasterizer]
|
||||
|
||||
shadow_filter=3
|
||||
trilinear_mipmap_filter=true
|
||||
|
||||
[render]
|
||||
|
||||
default_clear_color=#ff2e2e2e
|
|
@ -31,6 +31,7 @@ architecture/x86=false
|
|||
command_line/extra_args=""
|
||||
custom_package/debug=""
|
||||
custom_package/release=""
|
||||
debug/debugging_enabled=true
|
||||
keystore/release=""
|
||||
keystore/release_password=""
|
||||
keystore/release_user=""
|
||||
|
@ -216,6 +217,7 @@ version/name="1.0"
|
|||
|
||||
[platform:BlackBerry 10]
|
||||
|
||||
debug/debugging_enabled=true
|
||||
package/category="core.games"
|
||||
package/custom_template=""
|
||||
package/description="Game made with Godot Engine"
|
||||
|
@ -232,6 +234,7 @@ version/name="1.0"
|
|||
browser/enable_run=false
|
||||
custom_package/debug=""
|
||||
custom_package/release=""
|
||||
debug/debugging_enabled=true
|
||||
html/controls_enabled=true
|
||||
html/font_family="arial,sans-serif"
|
||||
html/head_include=""
|
||||
|
@ -244,12 +247,13 @@ options/memory_size=3
|
|||
binary/64_bits=true
|
||||
custom_binary/debug=""
|
||||
custom_binary/release=""
|
||||
debug/debugging_enabled=true
|
||||
resources/bundle_dependencies_(for_optical_disc)=false
|
||||
resources/pack_mode=1
|
||||
|
||||
[platform:Mac OSX]
|
||||
|
||||
application/64_bits=false
|
||||
application/bits_mode=0
|
||||
application/copyright=""
|
||||
application/icon=""
|
||||
application/identifier="com.godot.macgame"
|
||||
|
@ -260,6 +264,7 @@ application/signature="godotmacgame"
|
|||
application/version="1.0"
|
||||
custom_package/debug=""
|
||||
custom_package/release=""
|
||||
debug/debugging_enabled=true
|
||||
display/high_res=false
|
||||
|
||||
[platform:Windows Desktop]
|
||||
|
@ -267,9 +272,69 @@ display/high_res=false
|
|||
binary/64_bits=true
|
||||
custom_binary/debug=""
|
||||
custom_binary/release=""
|
||||
debug/debugging_enabled=true
|
||||
resources/bundle_dependencies_(for_optical_disc)=false
|
||||
resources/pack_mode=0
|
||||
|
||||
[platform:Windows Universal]
|
||||
|
||||
architecture/target=1
|
||||
capabilities/all_Joyn=false
|
||||
capabilities/appointments=false
|
||||
capabilities/blocked_Chat_Messages=false
|
||||
capabilities/bluetooth=false
|
||||
capabilities/chat=false
|
||||
capabilities/code_Generation=false
|
||||
capabilities/contacts=false
|
||||
capabilities/enterprise_Authentication=false
|
||||
capabilities/internet_Client=false
|
||||
capabilities/internet_Client_Server=false
|
||||
capabilities/location=false
|
||||
capabilities/microphone=false
|
||||
capabilities/music_Library=false
|
||||
capabilities/objects3_D=false
|
||||
capabilities/phone_Call=false
|
||||
capabilities/pictures_Library=false
|
||||
capabilities/private_Network_Client_Server=false
|
||||
capabilities/proximity=false
|
||||
capabilities/removable_Storage=false
|
||||
capabilities/shared_User_Certificates=false
|
||||
capabilities/user_Account_Information=false
|
||||
capabilities/videos_Library=false
|
||||
capabilities/voip_Call=false
|
||||
capabilities/webcam=false
|
||||
command_line/extra_args=""
|
||||
custom_package/debug=""
|
||||
custom_package/release=""
|
||||
debug/debugging_enabled=true
|
||||
identity/product_guid="00000000-0000-0000-0000-000000000000"
|
||||
identity/publisher_guid="00000000-0000-0000-0000-000000000000"
|
||||
images/background_color="transparent"
|
||||
images/splash_screen=null
|
||||
images/square150x150_logo=null
|
||||
images/square310x310_logo=null
|
||||
images/square44x44_logo=null
|
||||
images/square71x71_logo=null
|
||||
images/store_logo=null
|
||||
images/wide310x150_logo=null
|
||||
orientation/landscape=true
|
||||
orientation/landscape_flipped=true
|
||||
orientation/portrait=true
|
||||
orientation/portrait_flipped=true
|
||||
package/description="Godot Engine"
|
||||
package/display_name=""
|
||||
package/publisher="CN=GodotEngine"
|
||||
package/publisher_display_name="Godot Engine"
|
||||
package/short_name="Godot"
|
||||
package/unique_name="Godot.Engine"
|
||||
tiles/show_name_on_square150x150=false
|
||||
tiles/show_name_on_square310x310=false
|
||||
tiles/show_name_on_wide310x150=false
|
||||
version/build=0
|
||||
version/major=1
|
||||
version/minor=0
|
||||
version/revision=0
|
||||
|
||||
[script]
|
||||
|
||||
action="compile"
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
config_version=3
|
||||
[application]
|
||||
|
||||
name="Test3"
|
||||
main_scene="res://main.tscn"
|
||||
icon="res://icon.png"
|
||||
|
||||
[memory]
|
||||
|
||||
multithread/thread_rid_pool_prealloc=60
|
||||
|
||||
[rendering]
|
||||
|
||||
viewport/default_clear_color=Color( 0.407806, 0.628906, 0.618542, 1 )
|
|
@ -30,8 +30,8 @@ func _ready():
|
|||
st.add_vertex(Vector3(-rv, x, y))
|
||||
st.add_vertex(Vector3(rv, x, y))
|
||||
|
||||
var mesh = st.commit()
|
||||
set_mesh(mesh)
|
||||
mesh = st.commit()
|
||||
#set_mesh(mesh)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=true
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
|
@ -0,0 +1,261 @@
|
|||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://debug_camera.gd" type="Script" id=1]
|
||||
[ext_resource path="res://voxel_map.gd" type="Script" id=2]
|
||||
[ext_resource path="res://terrain.png" type="Texture" id=3]
|
||||
[ext_resource path="res://grid.gd" type="Script" id=4]
|
||||
|
||||
[sub_resource type="FixedSpatialMaterial" id=1]
|
||||
|
||||
flags_transparent = false
|
||||
flags_unshaded = false
|
||||
flags_on_top = false
|
||||
flags_use_point_size = false
|
||||
vertex_color_use_as_albedo = true
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_blend_mode = 0
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
albedo_color = Color( 1, 1, 1, 1 )
|
||||
albedo_texture = ExtResource( 3 )
|
||||
specular_mode = 0
|
||||
specular_color = Color( 0.1, 0.1, 0.1, 1 )
|
||||
specular_metalness = 0.1
|
||||
specular_roughness = 0.0
|
||||
emission_enabled = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
height_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector2( 1, 1 )
|
||||
uv1_offset = Vector2( 0, 0 )
|
||||
uv2_scale = Vector2( 1, 1 )
|
||||
uv2_offset = Vector2( 0, 0 )
|
||||
|
||||
[sub_resource type="FixedSpatialMaterial" id=2]
|
||||
|
||||
flags_transparent = true
|
||||
flags_unshaded = false
|
||||
flags_on_top = false
|
||||
flags_use_point_size = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_blend_mode = 0
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
albedo_color = Color( 0.7, 0.7, 0.7, 1 )
|
||||
albedo_texture = ExtResource( 3 )
|
||||
specular_mode = 0
|
||||
specular_color = Color( 0.1, 0.1, 0.1, 1 )
|
||||
specular_metalness = 0.1
|
||||
specular_roughness = 0.0
|
||||
emission_enabled = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
height_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector2( 1, 1 )
|
||||
uv1_offset = Vector2( 0, 0 )
|
||||
uv2_scale = Vector2( 1, 1 )
|
||||
uv2_offset = Vector2( 0, 0 )
|
||||
|
||||
[sub_resource type="Environment" id=3]
|
||||
|
||||
background_mode = 0
|
||||
background_skybox_scale = 1.0
|
||||
background_color = Color( 0, 0, 0, 1 )
|
||||
background_energy = 1.0
|
||||
background_canvas_max_layer = 0
|
||||
ambient_light_color = Color( 0, 0, 0, 1 )
|
||||
ambient_light_energy = 1.0
|
||||
ambient_light_skybox_contribution = 0.0
|
||||
ss_reflections_enabled = false
|
||||
ss_reflections_max_steps = 64
|
||||
ss_reflections_accel = 0.04
|
||||
ss_reflections_fade = 2.0
|
||||
ss_reflections_depth_tolerance = 0.2
|
||||
ss_reflections_accel_smooth = true
|
||||
ss_reflections_roughness = true
|
||||
ssao_enabled = false
|
||||
ssao_radius = 1.0
|
||||
ssao_intensity = 1.0
|
||||
ssao_radius2 = 0.0
|
||||
ssao_intensity2 = 1.0
|
||||
ssao_bias = 0.01
|
||||
ssao_light_affect = 0.0
|
||||
ssao_color = Color( 0, 0, 0, 1 )
|
||||
ssao_blur = true
|
||||
dof_blur_far_enabled = false
|
||||
dof_blur_far_distance = 128.0
|
||||
dof_blur_far_transition = 10.0
|
||||
dof_blur_far_amount = 0.1
|
||||
dof_blur_far_quality = 1
|
||||
dof_blur_near_enabled = false
|
||||
dof_blur_near_distance = 2.0
|
||||
dof_blur_near_transition = 1.0
|
||||
dof_blur_near_amount = 0.1
|
||||
dof_blur_near_quality = 1
|
||||
glow_enabled = false
|
||||
glow_levels/1 = false
|
||||
glow_levels/2 = false
|
||||
glow_levels/3 = true
|
||||
glow_levels/4 = false
|
||||
glow_levels/5 = true
|
||||
glow_levels/6 = false
|
||||
glow_levels/7 = false
|
||||
glow_intensity = 0.8
|
||||
glow_strength = 1.0
|
||||
glow_bloom = 0.0
|
||||
glow_blend_mode = 2
|
||||
glow_hdr_treshold = 1.0
|
||||
glow_hdr_scale = 2.0
|
||||
glow_bicubic_upscale = false
|
||||
tonemap_mode = 0
|
||||
tonemap_exposure = 1.0
|
||||
tonemap_white = 1.0
|
||||
auto_expoure_enabled = false
|
||||
auto_expoure_scale = 0.4
|
||||
auto_expoure_min_luma = 0.05
|
||||
auto_expoure_max_luma = 8.0
|
||||
auto_expoure_speed = 0.5
|
||||
adjustment_enabled = false
|
||||
adjustment_brightness = 1.0
|
||||
adjustment_contrast = 1.0
|
||||
adjustment_saturation = 1.0
|
||||
|
||||
[node name="Node" type="Node"]
|
||||
|
||||
[node name="Camera" type="Camera" parent="."]
|
||||
|
||||
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||
projection = 0
|
||||
fov = 80.0
|
||||
near = 0.1
|
||||
far = 500.0
|
||||
keep_aspect = 1
|
||||
current = false
|
||||
cull_mask = 1048575
|
||||
environment = null
|
||||
h_offset = 0.0
|
||||
v_offset = 0.0
|
||||
script = ExtResource( 1 )
|
||||
sensitivity = 0.4
|
||||
min_angle = -90
|
||||
max_angle = 90
|
||||
speed = 10.0
|
||||
capture_mouse = true
|
||||
|
||||
[node name="VoxelTerrain" type="VoxelTerrain" parent="."]
|
||||
|
||||
script = ExtResource( 2 )
|
||||
solid_material = SubResource( 1 )
|
||||
transparent_material = SubResource( 2 )
|
||||
|
||||
[node name="TestCube" type="TestCube" parent="."]
|
||||
|
||||
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -4.58428 )
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_as_billboard = false
|
||||
use_as_y_billboard = false
|
||||
use_depth_scale = false
|
||||
visible_in_all_rooms = false
|
||||
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
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="."]
|
||||
|
||||
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_as_billboard = false
|
||||
use_as_y_billboard = false
|
||||
use_depth_scale = false
|
||||
visible_in_all_rooms = false
|
||||
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 = null
|
||||
skeleton = NodePath("..")
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
|
||||
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||
environment = SubResource( 3 )
|
||||
|
||||
[node name="DirectionalLight" type="DirectionalLight" parent="."]
|
||||
|
||||
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||
transform = Transform( 0.875835, -0.352595, 0.329529, 0, 0.682806, 0.7306, -0.48261, -0.639885, 0.598026, 0, 0, 0 )
|
||||
layers = 1
|
||||
light_color = Color( 1, 1, 1, 1 )
|
||||
light_energy = 1.0
|
||||
light_negative = false
|
||||
light_specular = 0.5
|
||||
light_cull_mask = -1
|
||||
shadow_enabled = false
|
||||
shadow_color = Color( 0, 0, 0, 1 )
|
||||
shadow_bias = 0.1
|
||||
shadow_contact = 0.0
|
||||
shadow_max_distance = 0.0
|
||||
editor_only = false
|
||||
directional_shadow_mode = 2
|
||||
directional_shadow_split_1 = 0.1
|
||||
directional_shadow_split_2 = 0.2
|
||||
directional_shadow_split_3 = 0.5
|
||||
directional_shadow_blend_splits = false
|
||||
directional_shadow_normal_bias = 0.1
|
||||
directional_shadow_bias_split_scale = 0.1
|
||||
|
||||
[node name="DirectionalLight2" type="DirectionalLight" parent="."]
|
||||
|
||||
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||
transform = Transform( -0.863401, 0.368601, -0.344488, 0, 0.682806, 0.7306, 0.504518, 0.630801, -0.589536, -7.74279, 0, 0 )
|
||||
layers = 1
|
||||
light_color = Color( 1, 1, 1, 1 )
|
||||
light_energy = 0.2
|
||||
light_negative = false
|
||||
light_specular = 0.5
|
||||
light_cull_mask = -1
|
||||
shadow_enabled = false
|
||||
shadow_color = Color( 0, 0, 0, 1 )
|
||||
shadow_bias = 0.1
|
||||
shadow_contact = 0.0
|
||||
shadow_max_distance = 0.0
|
||||
editor_only = false
|
||||
directional_shadow_mode = 2
|
||||
directional_shadow_split_1 = 0.1
|
||||
directional_shadow_split_2 = 0.2
|
||||
directional_shadow_split_3 = 0.5
|
||||
directional_shadow_blend_splits = false
|
||||
directional_shadow_normal_bias = 0.1
|
||||
directional_shadow_bias_split_scale = 0.1
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/terrain.png-84a626877af7de08ecf24965bda52835.stex"
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=true
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
extends VoxelTerrain
|
||||
|
||||
const CustomProvider = preload("provider.gd")
|
||||
#const CustomProvider = preload("provider.gd")
|
||||
|
||||
export(Material) var solid_material = null
|
||||
export(Material) var transparent_material = null
|
||||
|
@ -23,7 +23,20 @@ func _ready():
|
|||
mesher.set_material(solid_material, 0)
|
||||
mesher.set_material(transparent_material, 1)
|
||||
|
||||
set_provider(CustomProvider.new())
|
||||
#set_provider(CustomProvider.new())
|
||||
var provider = VoxelProviderTest.new()
|
||||
provider.set_mode(VoxelProviderTest.MODE_WAVES)
|
||||
provider.set_pattern_size(Vector3(10,20,10))
|
||||
set_provider(provider)
|
||||
# var map = get_map()
|
||||
# for x in range(0, 50):
|
||||
# for y in range(0, 50):
|
||||
# for z in range(0, 50):
|
||||
# var v = 0
|
||||
# if randf() < 0.1:
|
||||
# v = 1+randi()%2
|
||||
# map.set_voxel(v, x, y-10, z)
|
||||
# map.set_voxel(0, 50,50,50)
|
||||
|
||||
force_load_blocks(Vector3(0,0,0), Vector3(12,4,12))
|
||||
# var Testouille = preload("debug_camera.gd")
|
||||
|
|
Loading…
Reference in New Issue