player
parent
a869419e51
commit
0c8a5ce775
@ -0,0 +1,4 @@
|
||||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://b6dhv8we51ghp"]
|
||||
|
||||
[resource]
|
||||
albedo_color = Color(0.916572, 0.000680376, 0.916566, 1)
|
||||
@ -0,0 +1,4 @@
|
||||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://crrj7v8qx56w6"]
|
||||
|
||||
[resource]
|
||||
albedo_color = Color(1.85303e-06, 0.563816, 0, 1)
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.6 KiB |
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d1i0he2my0qly"
|
||||
path.s3tc="res://.godot/imported/texture_01.png-c6d99995c9620bcf16477069238cd16b.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://material/texture_01.png"
|
||||
dest_files=["res://.godot/imported/texture_01.png-c6d99995c9620bcf16477069238cd16b.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://byobt37bfvqnn"
|
||||
path.s3tc="res://.godot/imported/texture_08.png-4852923502939adb9ecea79ae8aa5018.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://material/texture_08.png"
|
||||
dest_files=["res://.godot/imported/texture_08.png-4852923502939adb9ecea79ae8aa5018.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
@ -0,0 +1,20 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://7o1425mnc60b"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://d1i0he2my0qly" path="res://material/texture_01.png" id="1_ilpm3"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_7tslk"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_47j60"]
|
||||
albedo_texture = ExtResource("1_ilpm3")
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_p3rd5"]
|
||||
material = SubResource("StandardMaterial3D_47j60")
|
||||
|
||||
[node name="Box" type="StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("BoxShape3D_7tslk")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("BoxMesh_p3rd5")
|
||||
@ -0,0 +1,23 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cy23boc8vgagv"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://byobt37bfvqnn" path="res://material/texture_08.png" id="1_vogme"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_w1uy6"]
|
||||
albedo_texture = ExtResource("1_vogme")
|
||||
uv1_scale = Vector3(10, 10, 10)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_nlrtm"]
|
||||
material = SubResource("StandardMaterial3D_w1uy6")
|
||||
size = Vector3(100, 0.5, 100)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_bru48"]
|
||||
size = Vector3(100, 0.5, 100)
|
||||
|
||||
[node name="Floor" type="StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.25, 0)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("BoxMesh_nlrtm")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("BoxShape3D_bru48")
|
||||
@ -0,0 +1,84 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://ls50bb2tbyoq"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/player.gd" id="1_5eofs"]
|
||||
[ext_resource type="Material" uid="uid://crrj7v8qx56w6" path="res://material/player.tres" id="2_5tp3j"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_hco8d"]
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_6sech"]
|
||||
material = ExtResource("2_5tp3j")
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_yqgri"]
|
||||
material = ExtResource("2_5tp3j")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ssuxw"]
|
||||
albedo_color = Color(0, 0, 0, 1)
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_38l4q"]
|
||||
material = SubResource("StandardMaterial3D_ssuxw")
|
||||
radius = 0.1
|
||||
height = 0.2
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4355f"]
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_ef7sw"]
|
||||
material = SubResource("StandardMaterial3D_4355f")
|
||||
radius = 0.05
|
||||
height = 0.1
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_78t0f"]
|
||||
material = ExtResource("2_5tp3j")
|
||||
radius = 0.1
|
||||
height = 0.75
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
script = ExtResource("1_5eofs")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
shape = SubResource("CapsuleShape3D_hco8d")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.895191, 0.445682, 0, -0.445682, 0.895191, 0, 3.50399, 5.54464)
|
||||
|
||||
[node name="Root" type="Node3D" parent="."]
|
||||
|
||||
[node name="Bauch" type="MeshInstance3D" parent="Root"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
mesh = SubResource("CapsuleMesh_6sech")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="Kopf" type="MeshInstance3D" parent="Root"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
mesh = SubResource("SphereMesh_yqgri")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="RechtesAuge" type="MeshInstance3D" parent="Root"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.142299, 2.1937, -0.45327)
|
||||
mesh = SubResource("SphereMesh_38l4q")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="Pupille" type="MeshInstance3D" parent="Root/RechtesAuge"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.013465, -0.0100806, -0.0539168)
|
||||
mesh = SubResource("SphereMesh_ef7sw")
|
||||
skeleton = NodePath("../../..")
|
||||
|
||||
[node name="LinkesAuge" type="MeshInstance3D" parent="Root"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.157842, 2.1937, -0.45327)
|
||||
mesh = SubResource("SphereMesh_38l4q")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="Pupille2" type="MeshInstance3D" parent="Root/LinkesAuge"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0180475, -0.012116, -0.0547895)
|
||||
mesh = SubResource("SphereMesh_ef7sw")
|
||||
skeleton = NodePath("../../..")
|
||||
|
||||
[node name="RechterArm" type="MeshInstance3D" parent="Root"]
|
||||
transform = Transform3D(0.838671, -0.544639, 0, 0.544639, 0.838671, 0, 0, 0, 1, 0.54955, 1.36876, 0)
|
||||
mesh = SubResource("CapsuleMesh_78t0f")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="LinkerArm" type="MeshInstance3D" parent="Root"]
|
||||
transform = Transform3D(0.838671, 0.544639, 0, -0.544639, 0.838671, 0, 0, 0, 1, -0.559723, 1.36876, 0)
|
||||
mesh = SubResource("CapsuleMesh_78t0f")
|
||||
skeleton = NodePath("../..")
|
||||
@ -0,0 +1,30 @@
|
||||
extends CharacterBody3D
|
||||
|
||||
|
||||
@export var SPEED := 5.0
|
||||
@export var JUMP_VELOCITY := 4.5
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
# Add the gravity.
|
||||
if not is_on_floor():
|
||||
velocity += get_gravity() * delta
|
||||
|
||||
# Handle jump.
|
||||
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
|
||||
print("Springen")
|
||||
velocity.y = JUMP_VELOCITY
|
||||
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
var input_dir := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
|
||||
var direction := (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
|
||||
if direction:
|
||||
print("Laufe " + str(direction))
|
||||
velocity.x = direction.x * SPEED
|
||||
velocity.z = direction.z * SPEED
|
||||
else:
|
||||
velocity.x = move_toward(velocity.x, 0, SPEED)
|
||||
velocity.z = move_toward(velocity.z, 0, SPEED)
|
||||
|
||||
move_and_slide()
|
||||
Loading…
Reference in New Issue