Late Night Merge
This commit is contained in:
4
Collision/Assets/SkiBlade_material_3d.tres
Normal file
4
Collision/Assets/SkiBlade_material_3d.tres
Normal file
@@ -0,0 +1,4 @@
|
||||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://b7ixotws3ahnu"]
|
||||
|
||||
[resource]
|
||||
albedo_color = Color(1, 0, 0.302658, 1)
|
||||
@@ -1,10 +1,15 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cogj561sxuffx"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cogj561sxuffx"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b56smkir6r6e5" path="res://Collision/Scenes/Player.tscn" id="1_ph5kv"]
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_ah2ec"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_vu087"]
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_emir4"]
|
||||
[sub_resource type="Environment" id="Environment_emir4"]
|
||||
background_mode = 1
|
||||
background_color = Color(0, 0.717647, 1, 1)
|
||||
sdfgi_use_occlusion = true
|
||||
|
||||
[node name="Main" type="Node3D"]
|
||||
|
||||
@@ -17,8 +22,12 @@ mesh = SubResource("BoxMesh_ah2ec")
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"]
|
||||
shape = SubResource("BoxShape3D_vu087")
|
||||
|
||||
[node name="RigidBody3D" type="RigidBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
[node name="Player" parent="." instance=ExtResource("1_ph5kv")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6, 13)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="RigidBody3D"]
|
||||
mesh = SubResource("BoxMesh_emir4")
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.5, 0.866025, 0, -0.866025, 0.5, 0, 11.0056, 7)
|
||||
shadow_enabled = true
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_emir4")
|
||||
|
||||
44
Collision/Scenes/Player.tscn
Normal file
44
Collision/Scenes/Player.tscn
Normal file
@@ -0,0 +1,44 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://b56smkir6r6e5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bebu3iw1v8h5t" path="res://Collision/Scripts/PlayerMovement.gd" id="1_iti7a"]
|
||||
[ext_resource type="Material" uid="uid://b7ixotws3ahnu" path="res://Collision/Assets/SkiBlade_material_3d.tres" id="2_6ex3l"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_emir4"]
|
||||
friction = 0.0
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_iti7a"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_emir4"]
|
||||
albedo_color = Color(0, 0.00912619, 1, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_emir4"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_ph5kv"]
|
||||
|
||||
[node name="Player" type="RigidBody3D"]
|
||||
physics_material_override = SubResource("PhysicsMaterial_emir4")
|
||||
script = ExtResource("1_iti7a")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.524462, 0)
|
||||
mesh = SubResource("CapsuleMesh_iti7a")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_emir4")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.049, 0, 0, 0, 1, 0.382445, -0.474396, 0)
|
||||
mesh = SubResource("BoxMesh_emir4")
|
||||
skeleton = NodePath("../MeshInstance3D")
|
||||
surface_material_override/0 = ExtResource("2_6ex3l")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("BoxShape3D_ph5kv")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.866025, 0.5, 0, -0.5, 0.866025, 0, 3, 3)
|
||||
current = true
|
||||
|
||||
[node name="MeshInstance3D3" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.049, 0, 0, 0, 1, -0.397762, -0.474396, 0)
|
||||
mesh = SubResource("BoxMesh_emir4")
|
||||
skeleton = NodePath("../MeshInstance3D")
|
||||
surface_material_override/0 = ExtResource("2_6ex3l")
|
||||
10
Collision/Scripts/PlayerMovement.gd
Normal file
10
Collision/Scripts/PlayerMovement.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
extends RigidBody3D
|
||||
|
||||
@export var move_speed : float = 2.0
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
|
||||
if Input.is_key_pressed(KEY_LEFT):
|
||||
linear_velocity.x = -move_speed
|
||||
if Input.is_key_pressed(KEY_RIGHT):
|
||||
linear_velocity.x = move_speed
|
||||
1
Collision/Scripts/PlayerMovement.gd.uid
Normal file
1
Collision/Scripts/PlayerMovement.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bebu3iw1v8h5t
|
||||
Reference in New Issue
Block a user