added sword cursor

This commit is contained in:
derek
2025-06-26 11:19:44 -05:00
parent abe877c5da
commit 78d8ab4b10
15 changed files with 152 additions and 14 deletions

View File

@@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://c1evlkhnj37ky"]
[resource]
transparency = 1
blend_mode = 1
albedo_color = Color(0.586682, 0.458813, 0.00383217, 1)
emission_enabled = true
emission = Color(0.774314, 0.602011, 0.0986466, 1)
emission_energy_multiplier = 5.0

Binary file not shown.

View File

@@ -0,0 +1,53 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cbvijkdp1lqqw"
path="res://.godot/imported/BowCursor.blend-a70c23414219af23efa6df09ac2509cc.scn"
[deps]
source_file="res://Assets/Models/BowCursor.blend"
dest_files=["res://.godot/imported/BowCursor.blend-a70c23414219af23efa6df09ac2509cc.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/export_geometry_nodes_instances=false
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,60 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b4c4cu400yrgt"
path="res://.godot/imported/SwordCursor.blend-f9c7473568c1bc60c7978b764065f405.scn"
[deps]
source_file="res://Assets/Models/SwordCursor.blend"
dest_files=["res://.godot/imported/SwordCursor.blend-f9c7473568c1bc60c7978b764065f405.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={
"materials": {
"Sword": {
"use_external/enabled": true,
"use_external/path": "uid://c1evlkhnj37ky"
}
}
}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/export_geometry_nodes_instances=false
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true

Binary file not shown.

View File

@@ -18,7 +18,7 @@ bg_color = Color(0.458824, 0, 0.145098, 1)
bg_color = Color(0.457868, 0.677542, 0.145981, 1) bg_color = Color(0.457868, 0.677542, 0.145981, 1)
[sub_resource type="BoxShape3D" id="BoxShape3D_8uhk6"] [sub_resource type="BoxShape3D" id="BoxShape3D_8uhk6"]
size = Vector3(30, 1, 30) size = Vector3(60, 1, 60)
[node name="CameraFollow" type="Node3D"] [node name="CameraFollow" type="Node3D"]
script = ExtResource("1_ocbkm") script = ExtResource("1_ocbkm")

View File

@@ -51,8 +51,8 @@ margin = 0.0
radius = 0.0860376 radius = 0.0860376
[node name="GOLDCOIN" type="RigidBody3D"] [node name="GOLDCOIN" type="RigidBody3D"]
collision_layer = 32 collision_layer = 16
collision_mask = 33 collision_mask = 17
mass = 0.1 mass = 0.1
continuous_cd = true continuous_cd = true
contact_monitor = true contact_monitor = true

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=3 uid="uid://bacgd5lmvaxea"] [gd_scene load_steps=17 format=3 uid="uid://bacgd5lmvaxea"]
[ext_resource type="Script" uid="uid://bcgt64gerg8pv" path="res://Scripts/player.gd" id="1_5wxv7"] [ext_resource type="Script" uid="uid://bcgt64gerg8pv" path="res://Scripts/player.gd" id="1_5wxv7"]
[ext_resource type="Material" uid="uid://b4rpp31c0dx2m" path="res://Assets/Materials/BasicMat.tres" id="1_y6xdh"] [ext_resource type="Material" uid="uid://b4rpp31c0dx2m" path="res://Assets/Materials/BasicMat.tres" id="1_y6xdh"]
@@ -7,10 +7,15 @@
[ext_resource type="Script" uid="uid://wnisqyoyai2h" path="res://Scripts/player_on_floor.gd" id="4_hck1p"] [ext_resource type="Script" uid="uid://wnisqyoyai2h" path="res://Scripts/player_on_floor.gd" id="4_hck1p"]
[ext_resource type="Script" uid="uid://dhnl0penaqfkx" path="res://Scripts/player_dodge_roll.gd" id="5_hck1p"] [ext_resource type="Script" uid="uid://dhnl0penaqfkx" path="res://Scripts/player_dodge_roll.gd" id="5_hck1p"]
[ext_resource type="PackedScene" uid="uid://b12w4ut17srje" path="res://Assets/Models/Character1.blend" id="7_juxdh"] [ext_resource type="PackedScene" uid="uid://b12w4ut17srje" path="res://Assets/Models/Character1.blend" id="7_juxdh"]
[ext_resource type="PackedScene" uid="uid://b4c4cu400yrgt" path="res://Assets/Models/SwordCursor.blend" id="8_4qbli"]
[sub_resource type="BoxMesh" id="BoxMesh_5wxv7"] [sub_resource type="BoxMesh" id="BoxMesh_5wxv7"]
size = Vector3(0.945, 0.13, 0.135) size = Vector3(0.945, 0.13, 0.135)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_08u7w"]
transparency = 1
albedo_color = Color(1, 1, 1, 0)
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_y5hcb"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_y5hcb"]
radius = 0.362 radius = 0.362
@@ -119,6 +124,10 @@ transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, -0.
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.652269, 0.475497, -0.696594) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.652269, 0.475497, -0.696594)
mesh = SubResource("BoxMesh_5wxv7") mesh = SubResource("BoxMesh_5wxv7")
skeleton = NodePath("../..") skeleton = NodePath("../..")
surface_material_override/0 = SubResource("StandardMaterial3D_08u7w")
[node name="SwordCursor" parent="Body/ShittySword" instance=ExtResource("8_4qbli")]
transform = Transform3D(0.644047, 0.760603, 0.0817732, -3.35396e-06, -0.106892, 0.994271, 0.764986, -0.640357, -0.068841, -0.0904393, 4.17233e-07, 0.438631)
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
@@ -130,8 +139,8 @@ libraries = {
} }
[node name="Area3D" type="Area3D" parent="."] [node name="Area3D" type="Area3D" parent="."]
collision_layer = 32 collision_layer = 16
collision_mask = 32 collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
shape = SubResource("SphereShape3D_juxdh") shape = SubResource("SphereShape3D_juxdh")

View File

@@ -167,5 +167,6 @@ transform = Transform3D(0.0790682, 0, 0.996869, 0, 1, 0, -0.996869, 0, 0.0790682
[node name="CoinSpawner" parent="." instance=ExtResource("9_46b76")] [node name="CoinSpawner" parent="." instance=ExtResource("9_46b76")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.81324, 3.94453, 0.757049) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.81324, 3.94453, 0.757049)
[node name="MOUSEDEBUG" parent="." instance=ExtResource("10_tadml")] [node name="MOUSEDEBUG" parent="." node_paths=PackedStringArray("player") instance=ExtResource("10_tadml")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.21551, 0.500001, -0.339623) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.21551, 0.500001, -0.339623)
player = NodePath("../Player")

View File

@@ -1,6 +1,9 @@
extends Node3D extends Node3D
@export var player : Player
func _process(delta: float) -> void: func _process(delta: float) -> void:
var mouse_pos = MousePos.get_mouse_world_position(00001000) var mouse_pos = MousePos.get_mouse_world_position(00001000)
if mouse_pos != null: if mouse_pos != null:
global_position = mouse_pos global_position = Vector3(mouse_pos.x,.1,mouse_pos.z)
look_at(player.global_position, Vector3.UP)

View File

@@ -20,6 +20,9 @@ const STAMINA_REGEN_RATE = 10.0
const DODGE_STAMINA_COST = 30.0 const DODGE_STAMINA_COST = 30.0
const ATTACK_STAMINA_COST = 10.0 const ATTACK_STAMINA_COST = 10.0
func _ready() -> void:
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
func _physics_process(delta: float) -> void: func _physics_process(delta: float) -> void:
stamina_regen(delta) stamina_regen(delta)
move_and_slide() move_and_slide()

View File

@@ -1,11 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://jkl8odkxg2s2"] [gd_scene load_steps=3 format=3 uid="uid://jkl8odkxg2s2"]
[ext_resource type="Script" uid="uid://cne68wmdyr4ld" path="res://Scripts/mouseDebug.gd" id="1_ehadm"] [ext_resource type="Script" uid="uid://cne68wmdyr4ld" path="res://Scripts/mouseDebug.gd" id="1_ehadm"]
[ext_resource type="PackedScene" uid="uid://b4c4cu400yrgt" path="res://Assets/Models/SwordCursor.blend" id="2_1bvqy"]
[sub_resource type="SphereMesh" id="SphereMesh_ehadm"] [node name="MouseCursor" type="Node3D"]
[node name="MOUSEDEBUG" type="Node3D"]
script = ExtResource("1_ehadm") script = ExtResource("1_ehadm")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."] [node name="SwordCursor" parent="." instance=ExtResource("2_1bvqy")]
mesh = SubResource("SphereMesh_ehadm") transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)

View File

@@ -73,7 +73,8 @@ attack={
[layer_names] [layer_names]
3d_physics/layer_6="Objects" 3d_physics/layer_5="Objects"
3d_physics/layer_6="conflicts with MouseTable for some reason, leaving open for now"
3d_physics/layer_8="MouseTable" 3d_physics/layer_8="MouseTable"
[rendering] [rendering]