Adding moutain and its collisions

This commit is contained in:
yannk 2022-02-04 15:12:32 +01:00
parent ebc6a541c9
commit 955711d51f
10 changed files with 375 additions and 1 deletions

34
UI/labels.tscn Normal file
View file

@ -0,0 +1,34 @@
[gd_scene load_steps=4 format=3 uid="uid://bpi7k0gfnjgbt"]
[ext_resource type="Texture2D" uid="uid://buv7yoovo0sw" path="res://UI/marker.png" id="1_2jmfe"]
[ext_resource type="Script" path="res://UI/labels.gd" id="1_4t0l0"]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_4fvmj"]
[node name="labels" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( "1_4t0l0" )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="text" type="Label" parent="."]
material = SubResource( "CanvasItemMaterial_4fvmj" )
offset_left = -13.0
offset_top = -34.0
offset_right = 14.0
offset_bottom = -8.0
text = "1/4"
horizontal_alignment = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureRect" type="TextureRect" parent="."]
offset_left = -5.0
offset_top = -13.0
offset_right = 1115.0
offset_bottom = 1107.0
rect_scale = Vector2(0.01, 0.01)
texture = ExtResource( "1_2jmfe" )

BIN
UI/marker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

34
UI/marker.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture2D"
uid="uid://buv7yoovo0sw"
path="res://.godot/imported/marker.png-3608e1b2af8e3088a88fa0d1e60f3d6b.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UI/marker.png"
dest_files=["res://.godot/imported/marker.png-3608e1b2af8e3088a88fa0d1e60f3d6b.stex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
compress/streamed=false
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
detect_3d/compress_to=1

61
UI/marker.svg Normal file
View file

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="256"
height="256"
viewBox="0 0 256 256"
version="1.1"
id="svg5"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="marker.svg"
inkscape:export-filename="/home/yann/Documents/Games/godot4/godot-third-person-basic-scene/UI/marker.png"
inkscape:export-xdpi="420"
inkscape:export-ydpi="420"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="px"
showgrid="false"
width="12px"
inkscape:zoom="0.8809372"
inkscape:cx="84.569025"
inkscape:cy="107.8397"
inkscape:window-width="1920"
inkscape:window-height="997"
inkscape:window-x="0"
inkscape:window-y="31"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2" />
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<path
id="path846"
style="fill:#aeaeae;fill-opacity:0.5;fill-rule:evenodd;stroke-width:2.50646px;stop-color:#000000"
inkscape:transform-center-x="1.4092489e-05"
inkscape:transform-center-y="21.379976"
transform="matrix(1.1441785,0,0,1.1892921,-1.4910919,-1.4904532)"
d="M 221.95023,1.2532267 C 188.20336,19.997914 120.41607,216.50732 113.17385,216.50732 105.93162,216.50732 43.91753,22.37194 4.3974736,1.2532277 Z"
sodipodi:nodetypes="czcc" />
<path
id="path846-4"
style="fill:#4e4e4e;fill-opacity:1;fill-rule:evenodd;stroke-width:2.92383px;stop-color:#000000"
inkscape:transform-center-x="1.4092489e-05"
inkscape:transform-center-y="21.379976"
d="M 3.5410156,0 C 48.759015,25.116318 119.79217,256 128,256 136.36497,256 213.84654,22.292907 252.45898,0 213.84654,17.421236 136.36497,207.0332 128,207.0332 119.79217,207.0332 48.759015,19.627646 3.5410156,0 Z"
sodipodi:nodetypes="cscsc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

35
UI/marker.svg.import Normal file
View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture2D"
uid="uid://cwtnvaf0ay81t"
path="res://.godot/imported/marker.svg-9a2bffe0a59fc6c5eecbc1d0316012ca.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UI/marker.svg"
dest_files=["res://.godot/imported/marker.svg-9a2bffe0a59fc6c5eecbc1d0316012ca.stex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
compress/streamed=false
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0

View file

@ -10,5 +10,6 @@ transform = Transform3D(-0.0749787, -0.776052, 0.626196, 2.98023e-08, 0.627963,
shadow_enabled = true
[node name="player" parent="." instance=ExtResource( "2_bge2k" )]
transform = Transform3D(0.880742, 0, -0.473596, 0, 1, 0, 0.473596, 0, 0.880742, 13.9292, 0, -17.6199)
[node name="terrain_basic_setup" parent="." instance=ExtResource( "1_s50i7" )]

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=9 format=3 uid="uid://cvdmfc2hi172g"]
[gd_scene load_steps=10 format=3 uid="uid://cvdmfc2hi172g"]
[ext_resource type="Material" uid="uid://cdijyqa881tvv" path="res://maps/simple_grid_world.material" id="1_h84bv"]
[ext_resource type="Material" uid="uid://jrlyuynpu62b" path="res://maps/simple_grid.material" id="1_ympm1"]
[ext_resource type="PackedScene" uid="uid://cccuku6opjnvy" path="res://maps/moutain.tscn" id="3_rbp35"]
[sub_resource type="BoxMesh" id="BoxMesh_k23th"]
material = ExtResource( "1_h84bv" )
@ -193,3 +194,11 @@ skeleton = NodePath("../..")
[node name="shape" type="CollisionShape3D" parent="obstacles/obstacle4/collision"]
shape = SubResource( "ConcavePolygonShape3D_y7uft" )
[node name="moutain" parent="." instance=ExtResource( "3_rbp35" )]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 15.4657, -0.419849, -17.1644)
[node name="moutain2" parent="moutain" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -15.753, 0.0442026, 1.17911)
[editable path="moutain"]

163
maps/moutain.gltf Normal file

File diff suppressed because one or more lines are too long

28
maps/moutain.gltf.import Normal file
View file

@ -0,0 +1,28 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bas4wwnjq76wm"
path="res://.godot/imported/moutain.gltf-e33c0b8a05fbc6797cb2d9daa7127c18.scn"
[deps]
source_file="res://maps/moutain.gltf"
dest_files=["res://.godot/imported/moutain.gltf-e33c0b8a05fbc6797cb2d9daa7127c18.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.1
skins/use_named_skins=true
animation/import=true
animation/fps=30
import_script/path=""
_subresources={}

9
maps/moutain.tscn Normal file
View file

@ -0,0 +1,9 @@
[gd_scene load_steps=3 format=3 uid="uid://cccuku6opjnvy"]
[ext_resource type="PackedScene" uid="uid://bas4wwnjq76wm" path="res://maps/moutain.gltf" id="1_afq06"]
[ext_resource type="Material" uid="uid://cdijyqa881tvv" path="res://maps/simple_grid_world.material" id="2_pll6h"]
[node name="moutain" instance=ExtResource( "1_afq06" )]
[node name="moutain2" parent="." index="0"]
material_override = ExtResource( "2_pll6h" )