Added raycast
Added making object interactable Added slider + knob
This commit is contained in:
42
scenes/player.tscn
Normal file
42
scenes/player.tscn
Normal file
@@ -0,0 +1,42 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://u6bx2c081h3n"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Player.gd" id="1_s6pnw"]
|
||||
[ext_resource type="Script" path="res://scenes/Camera3D.gd" id="2_vvm4p"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_vhrs0"]
|
||||
radius = 0.2
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
script = ExtResource("1_s6pnw")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("CapsuleShape3D_vhrs0")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.673565, 0)
|
||||
script = ExtResource("2_vvm4p")
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="Camera3D"]
|
||||
target_position = Vector3(0, 0, -3)
|
||||
|
||||
[node name="PlayerUI" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="PlayerUI"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -0.5
|
||||
offset_top = -0.5
|
||||
offset_right = 1.5
|
||||
offset_bottom = 1.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
Reference in New Issue
Block a user