Add Sway and Bob

This commit is contained in:
2022-12-06 00:48:50 +01:00
parent 04a4ebc899
commit 825d86f271
26 changed files with 1513 additions and 116 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,26 @@
[gd_scene load_steps=4 format=3 uid="uid://bl7jynld7s25o"]
[ext_resource type="Script" path="res://scripts/player/PlayerQ3.gd" id="1"]
[ext_resource type="Script" path="res://scripts/player/Weapons.gd" id="2_dl1i1"]
[sub_resource type="CylinderShape3D" id="1"]
[node name="PlayerQ3" type="CharacterBody3D"]
script = ExtResource("1")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("1")
[node name="Body" type="Node3D" parent="."]
[node name="Head" type="Node3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.75, 0)
[node name="Hand" type="Node3D" parent="Body/Head"]
script = ExtResource("2_dl1i1")
sway_left = Vector3(0, 0.1, 0)
sway_right = Vector3(0, -0.1, 0)
[node name="Camera3D" type="Camera3D" parent="Body/Head"]
current = true

11
scenes/player/Sway.gd Normal file
View File

@@ -0,0 +1,11 @@
extends Node3D
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

View File

@@ -0,0 +1,13 @@
[gd_scene load_steps=2 format=3 uid="uid://p3r1q0d3ibmj"]
[ext_resource type="PackedScene" uid="uid://beiad4ywiojba" path="res://assets/Weapons/Gun/Revolver.gltf" id="1_j6rkf"]
[node name="Revolver" instance=ExtResource("1_j6rkf")]
transform = Transform3D(0.05, 0, 0, 0, 0.017101, -0.0469845, 0, 0.0469845, 0.017101, 0, -0.5, -0.3)
[node name="RootNode" parent="." index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.30501, 7.01204)
[node name="Cube011" parent="RootNode" index="0"]
cast_shadow = 0
gi_lightmap_scale = 2