Compare commits

...

52 Commits

Author SHA1 Message Date
98ed361546 reorganizing stuff
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 17s
Create tag and build when new code gets to main / Export (push) Successful in 9m26s
2026-01-18 17:04:28 +01:00
eb1c7f78fa flying knockback as well
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Has been cancelled
2026-01-18 16:58:23 +01:00
35b9ea383c knockback component 2026-01-18 12:39:01 +01:00
9690280cd7 better spawning
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 10m36s
2026-01-18 10:27:21 +01:00
65538495c4 spawning
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m59s
2026-01-17 23:18:06 +01:00
561e026834 ok so this should be the way to go
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 10m24s
2026-01-17 21:51:57 +01:00
7c74b8b5e5 removing broken ABC and refactoring enemy movement
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 10m2s
2026-01-17 19:55:51 +01:00
f7705a6d57 moving files around
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 10m3s
2026-01-17 17:58:23 +01:00
0dcf4a3f99 fixed damage composition issue 2026-01-17 17:47:14 +01:00
4ccdbc0ee6 broken composition and signals 2026-01-17 17:02:31 +01:00
0436053c62 broken composition and signals 2026-01-17 17:02:16 +01:00
6b97c226f1 setup damage types and modifiers as resources
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 10m48s
2026-01-17 14:32:48 +01:00
b1e78df6c7 some damage interfacing 2026-01-17 11:02:17 +01:00
5908494977 two enemy types, ready to refactor 2026-01-17 10:10:14 +01:00
63529a11ae removed tool script stuff
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 9m57s
2026-01-16 18:36:36 +01:00
255b87f991 basic interface and no success trying to use them in a Tool script 2026-01-16 18:35:58 +01:00
fd3eb35782 added enemy inputs as a resource
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 9m48s
2026-01-16 11:18:57 +01:00
9e75193731 enemies can move, also changed and named a few collision layers
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 10m18s
2026-01-16 11:05:02 +01:00
609078c584 enemy work
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 10m32s
2026-01-15 21:47:17 +01:00
893126ef78 starting on enemies 2026-01-14 18:10:37 +01:00
6737668391 groundslide camera setup
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 10m16s
2026-01-14 17:21:57 +01:00
ca77579168 ground sliding under stuff 2026-01-14 15:26:41 +01:00
c6559d593a fixed slope ground slide
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m32s
2026-01-14 10:21:50 +01:00
e32dac9e6e broken sloped slide
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 9m32s
2026-01-13 23:52:44 +01:00
30b4d1a2eb jumping from slides and some improvement on air gliding 2026-01-13 14:22:26 +01:00
2fa4ce68e7 revamped the dash, fixed an infinite jump issue and fixed buffered inputs
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 10m15s
2026-01-13 11:18:56 +01:00
80e533d98e simple slam and changed wall hugging to only work when input is towards the wall 2026-01-13 09:43:58 +01:00
0e3e258fd3 basic slide and air glide mechanic
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 17s
Create tag and build when new code gets to main / Export (push) Successful in 10m40s
2026-01-12 17:47:32 +01:00
c7991198ea code cleanup 2026-01-12 16:43:52 +01:00
1a4b2f4c19 Ended with remapping and removed old junk
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 10m34s
2026-01-12 15:41:43 +01:00
52a9c3f120 Remapped some inputs and added slide, slam and parry mappings 2026-01-12 14:58:43 +01:00
2301884418 added a wall jump section in the GYM 2026-01-12 12:01:40 +01:00
04054cfeae Added ground-like movement (i.e. air control when close to ground) and wall jumping away from the wall is always possible even when facing it 2026-01-12 11:52:35 +01:00
66be7838bb buffered inputs revamped and added mantle jumps and dashed
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 21s
Create tag and build when new code gets to main / Export (push) Successful in 10m30s
2026-01-11 18:14:53 +01:00
1eb65d1520 some shader work and improved mantle feel 2026-01-11 17:09:58 +01:00
f2a39316ba shader changes that don't do anything
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m48s
2026-01-07 17:11:49 +01:00
fffd8c947b implementing jump input buffering on grounded
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 9m47s
2026-01-07 09:58:18 +01:00
a1d57d6a1a some tuto fixing
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m49s
2026-01-06 16:35:17 +01:00
941205af2b small gravity and jump balancing, removed wall jumping coyote times
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m34s
2026-01-06 16:08:39 +01:00
6c2ad89687 fixing the manlting into geo
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m42s
2026-01-06 12:36:38 +01:00
59494f9e98 updating CI to build for linux as well
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m34s
2025-12-25 09:37:51 +01:00
510246c341 fix a scene load issue
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 21s
Create tag and build when new code gets to main / Export (push) Successful in 8m22s
2025-12-22 14:25:17 +01:00
b184bcdea5 added a small dash when leaving a wall run organically
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 8m36s
2025-12-21 17:23:38 +01:00
cf52af4237 mantling after aimed dash with new mantle system 2025-12-21 16:44:35 +01:00
e0fc301414 fixed user stuff
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 17s
Create tag and build when new code gets to main / Export (push) Successful in 8m10s
2025-12-19 19:11:53 +01:00
b792e8721c mantle system fix amazing
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 22s
Create tag and build when new code gets to main / Export (push) Successful in 8m19s
2025-12-19 18:59:34 +01:00
2e2df4ff50 new broken mantle system and fixed lots of gamefeel regarding wall hugs and jumps and coyote time
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 8m51s
2025-12-17 16:39:10 +01:00
a84e0ecfb3 Merge branch 'main' of https://git.game-dev.space/minimata/MovementTests
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 8m25s
2025-12-15 11:20:39 +01:00
f828c1d786 added a coyote time for wall jumps 2025-12-15 11:20:17 +01:00
a98785abec Update .gitea/workflows/main.yaml
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 8m49s
2025-12-10 21:26:25 +00:00
7c4e541446 fixed input mapping context issue
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 6m5s
2025-12-10 17:10:41 +01:00
7d31d17034 tuto fixes
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 6m7s
2025-12-10 10:04:05 +01:00
106 changed files with 4265 additions and 1874 deletions

View File

@@ -54,27 +54,12 @@ jobs:
- name: Import resources and build solution
run: |
godot --headless --editor --build-solutions --quit --import --path $PWD
- name: Build Windows
run: |
mkdir -v -p build/windows
godot --headless --verbose --build-solutions --export-release "Windows Desktop" build/windows/${{ env.GAME_NAME }}.exe
zip -r Windows.zip build/windows
- name: Build Windows ARM
run: |
mkdir -v -p build/windowsArm
godot --headless --verbose --build-solutions --export-release "Windows ARM" build/windowsArm/${{ env.GAME_NAME }}.exe
zip -r WindowsArm.zip build/windowsArm
# - name: Linux Build
# run: |
# mkdir -v -p build/linux
# godot --headless --verbose --export-release "Linux/X11" build/linux/${{ env.GAME_NAME }}.x86_64
# zip -r Linux.zip build/linux
# - name: Mac Build
# run: |
# mkdir -v -p build/mac
# godot --headless --verbose --export-release "macOS" build/mac/${{ env.GAME_NAME }}.zip
# zip -r Mac.zip build/mac
- name: Upload to Itch
uses: KikimoraGames/itch-publish@v0.0.3
with:
@@ -84,6 +69,12 @@ jobs:
buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
gameData: Windows.zip
buildChannel: windows
- name: Build Windows ARM
run: |
mkdir -v -p build/windowsArm
godot --headless --verbose --build-solutions --export-release "Windows ARM" build/windowsArm/${{ env.GAME_NAME }}.exe
zip -r WindowsArm.zip build/windowsArm
- name: Upload to Itch
uses: KikimoraGames/itch-publish@v0.0.3
with:
@@ -93,21 +84,33 @@ jobs:
buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
gameData: WindowsArm.zip
buildChannel: windows-arm
# - name: Upload to Itch
# uses: KikimoraGames/itch-publish@v0.0.3
# with:
# butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
# itchUsername: ${{ env.ITCHIO_USERNAME }}
# itchGameId: ${{ env.ITCHIO_GAMEID }}
# buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
# gameData: Linux.zip
# buildChannel: linux
# - name: Upload to Itch
# uses: KikimoraGames/itch-publish@v0.0.3
# with:
# butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
# itchUsername: ${{ env.ITCHIO_USERNAME }}
# itchGameId: ${{ env.ITCHIO_GAMEID }}
# buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
# gameData: Mac.zip
# buildChannel: mac
- name: Linux Build
run: |
mkdir -v -p build/linux
godot --headless --verbose --export-release "Linux/X11" build/linux/${{ env.GAME_NAME }}.x86_64
zip -r Linux.zip build/linux
- name: Upload to Itch
uses: KikimoraGames/itch-publish@v0.0.3
with:
butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
itchUsername: ${{ env.ITCHIO_USERNAME }}
itchGameId: ${{ env.ITCHIO_GAMEID }}
buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
gameData: Linux.zip
buildChannel: linux
- name: Mac Build
run: |
mkdir -v -p build/mac
godot --headless --verbose --export-release "macOS" build/mac/${{ env.GAME_NAME }}.zip
zip -r Mac.zip build/mac
- name: Upload to Itch
uses: KikimoraGames/itch-publish@v0.0.3
with:
butlerApiKey: ${{ secrets.BUTLER_TOKEN }}
itchUsername: ${{ env.ITCHIO_USERNAME }}
itchGameId: ${{ env.ITCHIO_GAMEID }}
buildNumber: ${{ needs.BumpTag.outputs.tag_name }}
gameData: Mac.zip
buildChannel: mac

1
.gitignore vendored
View File

@@ -10,6 +10,7 @@
.import/
/builds
/communication
# Imported translations (automatically generated from CSV files)
*.translation

View File

@@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAction_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F7c0f83388bfc4d2c9d09befcec9dd79bc90908_003Fb8_003F4d300c4d_003FAction_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fdf73a4db74df89d59655c5fb6326406f47fbfa9af1fa81518fe0a07c49d34133_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASceneTree_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F8d6960554e939a669841b1ece03d27df4ab42f92bb80be3767eaec8cdaccf84b_003FSceneTree_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=floorplane/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@@ -14,6 +14,7 @@ var credits_scene
var sub_menu
func load_game_scene() -> void:
GUIDE.disable_mapping_context(menu_context)
SceneLoader.load_scene(game_scene_path)
func new_game() -> void:

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -20,6 +20,8 @@ script = ExtResource("2_5i7wx")
material_override = ExtResource("3_u2uhe")
[node name="StaticBody3D" type="StaticBody3D" parent="Cube_279" index="0"]
collision_layer = 256
collision_mask = 65553
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cube_279/StaticBody3D" index="0"]
shape = SubResource("ConcavePolygonShape3D_5i7wx")
@@ -28,12 +30,15 @@ shape = SubResource("ConcavePolygonShape3D_5i7wx")
material_override = ExtResource("4_jmnc2")
[node name="StaticBody3D" type="StaticBody3D" parent="Cylinder_001" index="0"]
collision_layer = 256
collision_mask = 65553
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cylinder_001/StaticBody3D" index="0"]
shape = SubResource("ConcavePolygonShape3D_wai75")
[node name="Area3D" type="Area3D" parent="." index="2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -36.343, 0)
collision_layer = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" index="0"]
shape = SubResource("CylinderShape3D_wai75")

View File

@@ -27,7 +27,7 @@ shader_parameter/floorRoughnessMap = ExtResource("4_rir86")
shader_parameter/floorNormalMap = ExtResource("3_f1b6h")
shader_parameter/floorHeightMap = ExtResource("2_0e3id")
shader_parameter/floorUvScale = 0.5
shader_parameter/enablePom = true
shader_parameter/enablePom = false
shader_parameter/heightMinLayers = 8
shader_parameter/heightMaxLayers = 64
shader_parameter/heightScale = 0.08

View File

@@ -28,6 +28,7 @@ uniform float heightScale = 1.0;
varying vec3 worldPos;
varying vec3 worldNormal;
varying vec3 diffuse;
void vertex() {
@@ -177,12 +178,14 @@ void fragment() {
// sample and output
SPECULAR = specular;
ALBEDO = triplanarSample(texCoordX, texCoordY, texCoordZ, blend, yDot).rgb;
diffuse = ALBEDO;
ROUGHNESS = triplanarRoughness(texCoordX, texCoordY, texCoordZ, blend, yDot).r;
NORMAL = mix(worldNormal, triplanarNormal(yDot, texCoordX, texCoordY, texCoordZ, blend), normalMapStrength);
NORMAL = normalize((VIEW_MATRIX * vec4(NORMAL, 0.0)).xyz);
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}
void light() {
float lambert = clamp(dot(NORMAL, LIGHT), 0.0, 1.0);
float halfLambert = pow(lambert*0.5 + 0.5, 5);
DIFFUSE_LIGHT += halfLambert * ATTENUATION * LIGHT_COLOR / PI;
}

View File

@@ -31,7 +31,7 @@ shader_parameter/floorRoughnessMap = ExtResource("4_4vhk1")
shader_parameter/floorNormalMap = ExtResource("3_ytvoj")
shader_parameter/floorHeightMap = ExtResource("2_4vhk1")
shader_parameter/floorUvScale = 0.5
shader_parameter/enablePom = true
shader_parameter/enablePom = false
shader_parameter/heightMinLayers = 8
shader_parameter/heightMaxLayers = 64
shader_parameter/heightScale = 0.2

View File

@@ -27,7 +27,7 @@ shader_parameter/floorRoughnessMap = ExtResource("4_ob11h")
shader_parameter/floorNormalMap = ExtResource("3_ff2cr")
shader_parameter/floorHeightMap = ExtResource("2_roy1o")
shader_parameter/floorUvScale = 0.5
shader_parameter/enablePom = true
shader_parameter/enablePom = false
shader_parameter/heightMinLayers = 8
shader_parameter/heightMaxLayers = 64
shader_parameter/heightScale = 1.0

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,23 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class CDamageable : Node, IDamageable
{
public event Action<IDamageable, DamageRecord> DamageTaken;
[Export]
public RDamageModifier[] DamageModifiers { get; set; }
public DamageRecord TakeDamage(DamageRecord damageRecord)
{
var finalDamage = 0f;
foreach (var damageable in DamageModifiers.ToIDamageables())
finalDamage += damageable.TakeDamage(damageRecord).Damage.DamageDealt;
var finalDamageRecord = damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
DamageTaken?.Invoke(this, finalDamageRecord);
return finalDamageRecord;
}
}

View File

@@ -0,0 +1 @@
uid://b0u23nkpaimyc

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://hpsg4fqwrx1u"]
[ext_resource type="Script" uid="uid://b0u23nkpaimyc" path="res://components/damage/CDamageable.cs" id="1_qp8bd"]
[node name="CDamageable" type="Node"]
script = ExtResource("1_qp8bd")

View File

@@ -0,0 +1,24 @@
using Godot;
using System;
using Movementtests.systems.damage;
[GlobalClass]
public partial class RDamage : Resource
{
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float DamageDealt = 1.0f;
[Export]
public EDamageTypes DamageType = EDamageTypes.Normal;
public RDamage()
{
DamageDealt = 1.0f;
DamageType = EDamageTypes.Normal;
}
public RDamage(float damageDealt, EDamageTypes damageType)
{
DamageDealt = damageDealt;
DamageType = damageType;
}
}

View File

@@ -0,0 +1 @@
uid://jitubgv6judn

View File

@@ -0,0 +1,37 @@
using Godot;
using System;
using Movementtests.interfaces;
using Movementtests.systems.damage;
[GlobalClass]
public partial class RDamageModifier : Resource, IDamageable
{
public event Action<IDamageable, DamageRecord> DamageTaken;
[Export]
public EDamageTypes DamageType = EDamageTypes.Normal;
[Export]
public float Modifier = 1.0f;
public RDamageModifier()
{
Modifier = 1.0f;
DamageType = EDamageTypes.Normal;
}
public RDamageModifier(EDamageTypes damageType, float modifier)
{
Modifier = modifier;
DamageType = damageType;
}
public DamageRecord TakeDamage(DamageRecord damageRecord)
{
if (damageRecord.Damage.DamageType != DamageType)
return damageRecord with { Damage = new RDamage(0, damageRecord.Damage.DamageType) };
var finalDamage = damageRecord.Damage.DamageDealt * Modifier;
var finalDamageRecord = damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
DamageTaken?.Invoke(this, finalDamageRecord);
return finalDamageRecord;
}
}

View File

@@ -0,0 +1 @@
uid://b6y3ugfydvch0

View File

@@ -0,0 +1,33 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class CHealth : Node, IHealthable
{
public event Action<IHealthable, float> HealthChanged;
public event Action<IHealthable> HealthDepleted;
[Export]
public RHealth RHealth { get; set; }
public float CurrentHealth { get; set; }
public override void _Ready()
{
CurrentHealth = RHealth.StartingHealth;
}
public void ReduceHealth(IDamageable source, DamageRecord damageRecord)
{
GD.Print(CurrentHealth);
CurrentHealth -= damageRecord.Damage.DamageDealt;
HealthChanged?.Invoke(this, CurrentHealth);
if (CurrentHealth <= 0)
{
CurrentHealth = 0;
HealthDepleted?.Invoke(this);
}
}
}

View File

@@ -0,0 +1 @@
uid://bjwrpv3jpsc1e

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://c4ikbhojckpnc"]
[ext_resource type="Script" uid="uid://bjwrpv3jpsc1e" path="res://components/health/CHealth.cs" id="1_75uyt"]
[node name="CHealth" type="Node"]
script = ExtResource("1_75uyt")

View File

@@ -0,0 +1,12 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class RDeathEffect : Resource, IKillable
{
public void Kill(IHealthable source)
{
GD.Print($"Death Effect triggered on {source}");
}
}

View File

@@ -0,0 +1 @@
uid://b4cwruitopcee

View File

@@ -0,0 +1,20 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class RHealth : Resource
{
[Export]
public float StartingHealth = 100.0f;
public RHealth()
{
StartingHealth = 100.0f;
}
public RHealth(float startingHealth)
{
StartingHealth = startingHealth;
}
}

View File

@@ -0,0 +1 @@
uid://baiapod3csndf

View File

@@ -0,0 +1,25 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class CKnockback : Node3D, IKnockbackable
{
[Export] public RKnockback RKnockback { get; set;}
private DamageRecord _damageRecord = null;
public void RegisterKnockback(IDamageable source, DamageRecord damageRecord)
{
_damageRecord = damageRecord;
}
public Vector3 ComputeKnockback()
{
if (_damageRecord == null) return Vector3.Zero;
var knockbackDirection = GlobalPosition - _damageRecord.Source.GlobalPosition;
_damageRecord = null;
return knockbackDirection.Normalized() * RKnockback.Modifier;
}
}

View File

@@ -0,0 +1 @@
uid://b8dprpcjeac7e

View File

@@ -0,0 +1,12 @@
[gd_scene load_steps=4 format=3 uid="uid://bctpe34ddamg5"]
[ext_resource type="Script" uid="uid://b8dprpcjeac7e" path="res://components/knockback/CKnockback.cs" id="1_ix2yg"]
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://components/knockback/RKnockback.cs" id="2_uqiml"]
[sub_resource type="Resource" id="Resource_gbu2d"]
script = ExtResource("2_uqiml")
metadata/_custom_type_script = "uid://b44cse62qru7j"
[node name="CKnockback" type="Node3D"]
script = ExtResource("1_ix2yg")
RKnockback = SubResource("Resource_gbu2d")

View File

@@ -0,0 +1,19 @@
using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass]
public partial class RKnockback : Resource
{
[Export]
public float Modifier = 1.0f;
public RKnockback()
{
Modifier = 1.0f;
}
public RKnockback(float modifier)
{
Modifier = modifier;
}
}

View File

@@ -0,0 +1 @@
uid://b44cse62qru7j

View File

@@ -0,0 +1,61 @@
using Godot;
using Movementtests.interfaces;
namespace Movementtests.scenes.movement;
public partial class CFlyingMovement : Node3D, IMoveable
{
[Export] public RMovement RMovement { get; set; }
[Export(PropertyHint.Layers3DPhysics)]
public uint TerrainCollision { get; set; } = 1;
private bool _movingToDesiredHeight = true;
private Vector3 _randomDirection;
public override void _Ready()
{
_randomDirection = new Vector3(GD.RandRange(-1, 1), 1, GD.RandRange(-1, 1)).Normalized();
}
public Vector3 ComputeVelocity(MovementInputs inputs)
{
var velocity = inputs.Velocity;
var spaceState = GetWorld3D().DirectSpaceState;
var target = inputs.TargetLocation;
var direction = (target - GlobalPosition).Normalized();
// Check if we have a direct line of sight to the player
if (!_movingToDesiredHeight)
{
velocity = velocity.Lerp(direction * RMovement.Speed, (float) inputs.delta * RMovement.Acceleration);
var query = PhysicsRayQueryParameters3D.Create(GlobalPosition, target, TerrainCollision);
var result = spaceState.IntersectRay(query);
if (result.Count > 0)
{
_movingToDesiredHeight = true;
_randomDirection = new Vector3(GD.RandRange(-1, 1), 1, GD.RandRange(-1, 1)).Normalized();
}
}
else
{
velocity = velocity.Lerp(_randomDirection * RMovement.Speed, (float) inputs.delta * RMovement.Acceleration);
var groundQuery = PhysicsRayQueryParameters3D.Create(GlobalPosition, GlobalPosition+Vector3.Down*RMovement.TargetHeight, TerrainCollision);
var groundResult = spaceState.IntersectRay(groundQuery);
if (groundResult.Count == 0)
{
velocity.Y = 0;
var query = PhysicsRayQueryParameters3D.Create(GlobalPosition, target, TerrainCollision);
var result = spaceState.IntersectRay(query);
if (result.Count == 0)
{
_movingToDesiredHeight = false;
}
}
}
return velocity;
}
}

View File

@@ -0,0 +1 @@
uid://cps1rbkxs3nvq

View File

@@ -0,0 +1,7 @@
[gd_scene load_steps=2 format=3 uid="uid://dmw5ibwrb483f"]
[ext_resource type="Script" uid="uid://cps1rbkxs3nvq" path="res://components/movement/CFlyingMovement.cs" id="1_i26q2"]
[node name="CFlyingMovement" type="Node3D"]
script = ExtResource("1_i26q2")
CollisionMask = 256

View File

@@ -0,0 +1,34 @@
using Godot;
using Movementtests.interfaces;
namespace Movementtests.scenes.movement;
public partial class CGroundedMovement : Node3D, IMoveable
{
[Export] public RMovement RMovement { get; set; }
[Export]
public RayCast3D WallInFrontRayCast { get; set; }
public Vector3 ComputeVelocity(MovementInputs inputs)
{
var velocity = inputs.Velocity;
var target = inputs.TargetLocation;
var direction = (target - GlobalPosition).Normalized();
var targetPlane = new Vector3(target.X, GlobalPosition.Y, target.Z);
LookAt(targetPlane);
float xAcc = (float) Mathf.Lerp(velocity.X, direction.X * RMovement.Speed, inputs.delta * RMovement.Acceleration);
float zAcc = (float) Mathf.Lerp(velocity.Z, direction.Z * RMovement.Speed, inputs.delta * RMovement.Acceleration);
velocity.X = xAcc;
velocity.Z = zAcc;
if (WallInFrontRayCast.IsColliding())
velocity.Y = RMovement.Speed;
else if (!inputs.isOnFloor)
velocity += inputs.gravity * (float)inputs.delta * RMovement.GravityModifier;
return velocity;
}
}

View File

@@ -0,0 +1 @@
uid://bdag2eeixw2lt

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dbr7ioio158ew"]
[ext_resource type="Script" uid="uid://bdag2eeixw2lt" path="res://components/movement/CGroundedMovement.cs" id="1_e0agf"]
[node name="CGroundedMovement" type="Node3D"]
script = ExtResource("1_e0agf")

View File

@@ -0,0 +1,31 @@
using Godot;
using System;
[GlobalClass]
public partial class RMovement : Resource
{
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float Speed { get; set;}
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float Acceleration { get; set;}
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float GravityModifier { get; set;}
[Export(PropertyHint.Range, "0,20,1,or_greater")]
public float TargetHeight { get; set;}
public RMovement()
{
Speed = 3.0f;
Acceleration = 1.0f;
GravityModifier = 1.0f;
TargetHeight = 10.0f;
}
public RMovement(float speed, float acceleration, float gravityModifier, float targetHeight)
{
Speed = speed;
Acceleration = acceleration;
GravityModifier = gravityModifier;
TargetHeight = targetHeight;
}
}

View File

@@ -0,0 +1 @@
uid://dtpxijlnb2c5

View File

@@ -0,0 +1,9 @@
using Godot;
namespace Movementtests.interfaces;
public interface IDamageDealer
{
[Export]
RDamage RDamage { get; set; }
}

View File

@@ -0,0 +1 @@
uid://wdqo51131g5

12
interfaces/IDamageable.cs Normal file
View File

@@ -0,0 +1,12 @@
using System;
using Godot;
namespace Movementtests.interfaces;
public record DamageRecord(Node3D Source, RDamage Damage);
public interface IDamageable
{
event Action<IDamageable, DamageRecord> DamageTaken;
DamageRecord TakeDamage(DamageRecord damageRecord);
}

View File

@@ -0,0 +1 @@
uid://cf56b2ep3bu3j

16
interfaces/IHealthable.cs Normal file
View File

@@ -0,0 +1,16 @@
using System;
using Godot;
namespace Movementtests.interfaces;
public interface IHealthable
{
event Action<IHealthable, float> HealthChanged;
event Action<IHealthable> HealthDepleted;
[Export] RHealth RHealth { get; set; }
float CurrentHealth { get; set; }
void ReduceHealth(IDamageable source, DamageRecord damageRecord);
}

View File

@@ -0,0 +1 @@
uid://bea2kvnu3kuhu

6
interfaces/IKillable.cs Normal file
View File

@@ -0,0 +1,6 @@
namespace Movementtests.interfaces;
public interface IKillable
{
void Kill(IHealthable source);
}

View File

@@ -0,0 +1 @@
uid://dqpjr2d01sk1a

View File

@@ -0,0 +1,11 @@
using Godot;
namespace Movementtests.interfaces;
public interface IKnockbackable
{
[Export] RKnockback RKnockback { get; set;}
public void RegisterKnockback(IDamageable source, DamageRecord damageRecord);
public Vector3 ComputeKnockback();
}

View File

@@ -0,0 +1 @@
uid://bh06s1yefucf7

16
interfaces/IMoveable.cs Normal file
View File

@@ -0,0 +1,16 @@
using Godot;
namespace Movementtests.interfaces;
public record MovementInputs(
Vector3 Velocity = default,
Vector3 TargetLocation = default,
bool isOnFloor = false,
Vector3 gravity = default,
double delta = 0);
public interface IMoveable
{
[Export] RMovement RMovement { get; set; }
Vector3 ComputeVelocity(MovementInputs inputs);
}

View File

@@ -0,0 +1 @@
uid://dp6v42a2iwlbs

7
interfaces/ISpawnable.cs Normal file
View File

@@ -0,0 +1,7 @@
using Godot;
interface ISpawnable
{
void Initialize();
}

View File

@@ -0,0 +1 @@
uid://bethuw2c1at8o

View File

@@ -0,0 +1,16 @@
using Godot;
using System.Linq;
namespace Movementtests.interfaces;
public static class NodeExtensions
{
public static IDamageable[] ToIDamageables(this GodotObject[] nodes)
{
return nodes == null ? System.Array.Empty<IDamageable>() : nodes.OfType<IDamageable>().ToArray();
}
public static IKillable[] ToIKillables(this GodotObject[] nodes)
{
return nodes == null ? System.Array.Empty<IKillable>() : nodes.OfType<IKillable>().ToArray();
}
}

View File

@@ -0,0 +1 @@
uid://bgnncty7axdwd

156
maps/GYMs/enemies.tscn Normal file
View File

@@ -0,0 +1,156 @@
[gd_scene load_steps=20 format=3 uid="uid://q7uc1h2jpbd2"]
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_62kkh"]
[ext_resource type="Material" uid="uid://31aulub2nqov" path="res://assets/greybox/m_greybox.tres" id="2_3uydm"]
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://components/damage/RDamage.cs" id="2_sysok"]
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="3_3uydm"]
[ext_resource type="Script" uid="uid://b4cwruitopcee" path="res://components/health/RDeathEffect.cs" id="5_7m3bq"]
[ext_resource type="PackedScene" uid="uid://cmlud1hwkd6sv" path="res://scenes/enemies/flying_enemy/flying_enemy.tscn" id="5_8fd2t"]
[ext_resource type="PackedScene" uid="uid://c305mfrtumcyq" path="res://scenes/spawners/spawner.tscn" id="6_7m3bq"]
[ext_resource type="Resource" uid="uid://bqq6uukbdfysr" path="res://scenes/enemies/grounded_enemy/grounded_enemy_movement.tres" id="7_caohq"]
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://components/health/RHealth.cs" id="9_2e4ci"]
[ext_resource type="Resource" uid="uid://otfc2snh8umc" path="res://scenes/enemies/grounded_enemy/grounded_enemy_damage.tres" id="9_dmw1t"]
[ext_resource type="Resource" uid="uid://dgo65k2ceqfvy" path="res://scenes/enemies/flying_enemy/flying_enemy_damage.tres" id="9_gp7s3"]
[ext_resource type="Resource" uid="uid://bwqjaom4k7rc3" path="res://scenes/enemies/flying_enemy/flying_enemy_movement.tres" id="10_spw1u"]
[ext_resource type="Resource" uid="uid://dg1xbjhyhgnnk" path="res://scenes/enemies/flying_enemy/flying_enemy_health.tres" id="11_2e4ci"]
[sub_resource type="Resource" id="Resource_2e4ci"]
script = ExtResource("2_sysok")
metadata/_custom_type_script = "uid://jitubgv6judn"
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_0xm2m"]
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
[sub_resource type="Sky" id="Sky_h2yge"]
sky_material = SubResource("ProceduralSkyMaterial_0xm2m")
[sub_resource type="Environment" id="Environment_1bvp3"]
background_mode = 2
sky = SubResource("Sky_h2yge")
ambient_light_source = 2
ambient_light_color = Color(0.576076, 0.459788, 0.652401, 1)
reflected_light_source = 2
tonemap_mode = 4
tonemap_exposure = 1.32
ssao_enabled = true
ssao_radius = 3.61
ssil_enabled = true
ssil_radius = 8.4
sdfgi_use_occlusion = true
glow_enabled = true
[sub_resource type="Resource" id="Resource_sysok"]
script = ExtResource("5_7m3bq")
metadata/_custom_type_script = "uid://b4cwruitopcee"
[sub_resource type="Resource" id="Resource_ybosk"]
script = ExtResource("9_2e4ci")
StartingHealth = 1.0
metadata/_custom_type_script = "uid://baiapod3csndf"
[node name="Main" type="Node3D"]
[node name="Player" parent="." instance=ExtResource("1_62kkh")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 7.5)
TutorialDone = true
RDamage = SubResource("Resource_2e4ci")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_1bvp3")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.772218, 0.611111, 0.173844, 0.0446935, -0.220691, 0.974319, 0.633783, 0.760157, 0.143109, 0, 0, 0)
shadow_enabled = true
[node name="Greybox" type="CSGCombiner3D" parent="."]
use_collision = true
collision_layer = 256
collision_mask = 65553
[node name="CSGBox3D" type="CSGBox3D" parent="Greybox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.096, -0.5, -46.329)
use_collision = true
size = Vector3(100, 1, 190.741)
material = ExtResource("2_3uydm")
[node name="CSGBox3D2" type="CSGBox3D" parent="Greybox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -21.346, 4.5, 2.7915)
use_collision = true
size = Vector3(6.5, 11, 5.5)
material = ExtResource("2_3uydm")
[node name="CSGBox3D6" type="CSGBox3D" parent="Greybox"]
transform = Transform3D(0.70710677, 0, -0.70710677, 0, 1, 0, 0.70710677, 0, 0.70710677, -15.846001, 2.75, 2.0415)
use_collision = true
size = Vector3(6.5, 7.5, 11)
material = ExtResource("2_3uydm")
[node name="CSGBox3D7" type="CSGBox3D" parent="Greybox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.346001, 1, 1.0415001)
use_collision = true
size = Vector3(6.5, 4, 17)
material = ExtResource("2_3uydm")
[node name="CSGBox3D8" type="CSGBox3D" parent="Greybox"]
transform = Transform3D(0.81915206, 0, 0.57357645, 0, 1, 0, -0.57357645, 0, 0.81915206, -7.3460007, 0, -3.9585)
use_collision = true
size = Vector3(6.5, 4, 17)
material = ExtResource("2_3uydm")
[node name="CSGBox3D3" type="CSGBox3D" parent="Greybox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.154, 4.5, 2.7915)
use_collision = true
size = Vector3(6.5, 11, 5.5)
material = ExtResource("2_3uydm")
[node name="CSGBox3D4" type="CSGBox3D" parent="Greybox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.154, 4.5, -14.2085)
use_collision = true
size = Vector3(6.5, 11, 5.5)
material = ExtResource("2_3uydm")
[node name="CSGBox3D5" type="CSGBox3D" parent="Greybox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.8460007, 4.5, 17.7915)
use_collision = true
size = Vector3(6.5, 11, 5.5)
material = ExtResource("2_3uydm")
[node name="Enemy" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("3_3uydm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -16.83681)
Target = NodePath("../Player")
DeathEffects = Array[Object]([SubResource("Resource_sysok")])
[node name="Enemy2" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("3_3uydm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 0, -16.83681)
Target = NodePath("../Player")
[node name="Enemy3" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("3_3uydm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, -16.83681)
Target = NodePath("../Player")
[node name="FlyingEnemy" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("5_8fd2t")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8, 7, -16)
Target = NodePath("../Player")
[node name="FlyingEnemy2" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("5_8fd2t")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 7, -16)
Target = NodePath("../Player")
[node name="GroundedSpawner" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("6_7m3bq")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 2.5, -15)
EnemyToSpawn = ExtResource("3_3uydm")
MovementInputs = ExtResource("7_caohq")
HealthInputs = SubResource("Resource_ybosk")
DamageInputs = ExtResource("9_dmw1t")
Target = NodePath("../Player")
IsActiveOnStart = false
[node name="FlyingSpawner" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("6_7m3bq")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 11, -14)
EnemyToSpawn = ExtResource("5_8fd2t")
MovementInputs = ExtResource("10_spw1u")
HealthInputs = ExtResource("11_2e4ci")
DamageInputs = ExtResource("9_gp7s3")
Target = NodePath("../Player")
IsActiveOnStart = false

View File

@@ -30,6 +30,7 @@ glow_enabled = true
[node name="Player" parent="." instance=ExtResource("1_ig7tw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.7981, 1.6118, 39.3006)
TutorialDone = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_1bvp3")

View File

@@ -46,11 +46,11 @@ visible = false
[node name="Greybox" type="CSGCombiner3D" parent="."]
use_collision = true
collision_layer = 3
collision_mask = 5
collision_layer = 256
collision_mask = 65553
[node name="CSGBox3D" type="CSGBox3D" parent="Greybox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.09619, -0.472656, -46.3293)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.096, -0.5, -46.329)
use_collision = true
size = Vector3(100, 1, 190.741)
material = ExtResource("3_vvhq3")
@@ -133,6 +133,21 @@ material = ExtResource("3_vvhq3")
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 1, 0.1, -9.5)
text = "10m"
[node name="Label3D6" type="Label3D" parent="Greybox/RunningTrack"]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 27.5, 0.1, 1)
text = "10deg
"
[node name="Label3D7" type="Label3D" parent="Greybox/RunningTrack"]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 30.5, 0.1, 1)
text = "20deg
"
[node name="Label3D8" type="Label3D" parent="Greybox/RunningTrack"]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 33.5, 0.1, 1)
text = "30deg
"
[node name="Label3D2" type="Label3D" parent="Greybox/RunningTrack"]
transform = Transform3D(5, 0, 0, 0, -2.18557e-07, 5, 0, -5, -2.18557e-07, 1, 0.1, -19.5)
text = "20m"
@@ -159,6 +174,38 @@ text = "0.5m"
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -6.5)
text = "1m"
[node name="Label3D22" type="Label3D" parent="Greybox/JumpHeights"]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, 1)
text = "1.5m"
[node name="Label3D23" type="Label3D" parent="Greybox/JumpHeights"]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -11)
text = "2m"
[node name="Label3D24" type="Label3D" parent="Greybox/JumpHeights"]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -21.5)
text = "3m"
[node name="Label3D25" type="Label3D" parent="Greybox/JumpHeights"]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -31)
text = "4m"
[node name="Label3D26" type="Label3D" parent="Greybox/JumpHeights"]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -41.5)
text = "5m"
[node name="Label3D27" type="Label3D" parent="Greybox/JumpHeights"]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -51.5)
text = "6m"
[node name="Label3D28" type="Label3D" parent="Greybox/JumpHeights"]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -61)
text = "7m"
[node name="Label3D29" type="Label3D" parent="Greybox/JumpHeights"]
transform = Transform3D(-2.1855689e-07, 5, 2.18557e-07, 0, -2.18557e-07, 5, 5, 2.1855689e-07, 9.55343e-15, -28.5, 0.1, -74.5)
text = "8m"
[node name="Label3D8" type="Label3D" parent="Greybox/JumpHeights"]
transform = Transform3D(-2.18557e-07, -5, -2.18557e-07, 0, -2.18557e-07, 5, -5, 2.18557e-07, 9.55343e-15, -7, 0.1, -11.5)
text = "1.5m"
@@ -324,9 +371,111 @@ size = Vector3(5, 17.5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D29" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.5, 10, -76.5)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30.25, 10, -40)
use_collision = true
size = Vector3(5, 20, 5)
size = Vector3(0.5, 20, 80)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D33" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24.75, 10, -5)
use_collision = true
size = Vector3(7.5, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D41" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22.75, 5, -1.5)
use_collision = true
size = Vector3(12.5, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D47" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 0.9848078, 0.17364816, 0, -0.17364816, 0.9848078, 22.75, 0.03095889, -30.695885)
use_collision = true
size = Vector3(12.5, 10, 58)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D48" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 0.9396926, 0.34202012, 0, -0.34202012, 0.9396926, 30.5, 1.5878377, -16.713436)
use_collision = true
size = Vector3(3, 6.5, 31.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D49" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 0.86602545, 0.5, 0, -0.5, 0.86602545, 33.5, 2.5053406, -10.524445)
use_collision = true
size = Vector3(3, 5.5, 20.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D42" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.5, 5, -1.5)
use_collision = true
size = Vector3(3, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D43" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 33.5, 5, -1.5)
use_collision = true
size = Vector3(3, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D44" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 36.5, 5, -1.5)
use_collision = true
size = Vector3(3, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D45" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 39.5, 5, -1.5)
use_collision = true
size = Vector3(3, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D46" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 42.5, 5, -1.5)
use_collision = true
size = Vector3(3, 10, 3)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D34" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24.5, 10, -15)
use_collision = true
size = Vector3(7, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D35" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24, 10, -25)
use_collision = true
size = Vector3(6, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D36" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.5, 10, -35)
use_collision = true
size = Vector3(5, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D37" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23, 10, -45)
use_collision = true
size = Vector3(4, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D38" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22.5, 10, -55)
use_collision = true
size = Vector3(3, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D39" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22, 10, -65)
use_collision = true
size = Vector3(2, 20, 10)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D40" type="CSGBox3D" parent="Greybox/JumpHeights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -21.5, 10, -75)
use_collision = true
size = Vector3(1, 20, 10)
material = ExtResource("3_vvhq3")
[node name="Passageways" type="CSGCombiner3D" parent="Greybox"]
@@ -357,6 +506,162 @@ use_collision = true
size = Vector3(5, 3, 2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D38" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 21.5, 2.25, 22.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D39" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 21.25, 0.5, 22.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D40" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 28.5, 2.25, 22.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D41" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 28.25, 0.25, 22.5)
operation = 2
use_collision = true
size = Vector3(5, 2.5, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D42" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 35.5, 2.25, 22.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D43" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 35.25, -0.5, 22.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D44" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 42.5, 2.25, 22.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D45" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 42.25, -1, 22.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D46" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 21.5, 2.25, 31.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D47" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 21.25, 0.5, 31.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D48" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 28.5, 2.25, 31.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D49" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 28.25, 0.25, 31.5)
operation = 2
use_collision = true
size = Vector3(5, 2.5, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D50" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 35.5, 2.25, 31.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D51" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 35.25, -0.5, 31.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D52" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 42.5, 2.25, 31.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D53" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-2.6226834e-08, 0, -1, 0, 1, 0, 0.6, 0, -4.371139e-08, 42.25, -1, 31.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D54" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 21.5, 2.25, 39.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D55" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 21.25, 0.5, 39.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D56" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 28.5, 2.25, 39.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D57" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 28.25, 0.25, 39.5)
operation = 2
use_collision = true
size = Vector3(5, 2.5, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D58" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 35.5, 2.25, 39.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D59" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 35.25, -0.5, 39.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D60" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 42.5, 2.25, 39.5)
use_collision = true
size = Vector3(5, 5, 5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D61" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(-7.86805e-09, 0, -1, 0, 1, 0, 0.18, 0, -4.371139e-08, 42.25, -1, 39.5)
operation = 2
use_collision = true
size = Vector3(5, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D32" type="CSGBox3D" parent="Greybox/Passageways"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 2.25, -26.5)
use_collision = true
@@ -400,3 +705,211 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 4.5, -11.5)
use_collision = true
size = Vector3(1, 0.5, 5)
material = ExtResource("3_vvhq3")
[node name="Mantles" type="CSGCombiner3D" parent="Greybox"]
[node name="Label3D22" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -5.5, 0.1, 11)
text = "0.5m"
[node name="Label3D35" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -8.5, 0.1, 11)
text = "0.25m"
[node name="Label3D23" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -2, 0.1, 11)
text = "1m"
[node name="Label3D27" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -11, 0.1, 12.5)
text = "1m"
[node name="Label3D28" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 13, 0.1, 12.5)
text = "1m"
[node name="Label3D29" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 13, 0.1, 21)
text = "2m"
[node name="Label3D30" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 13, 0.1, 28.5)
text = "3m"
[node name="Label3D31" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -11, 0.1, 21)
text = "2m"
[node name="Label3D32" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -11, 0.1, 28.5)
text = "3m"
[node name="Label3D24" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 2, 0.1, 11)
text = "1.5m"
[node name="Label3D25" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 6, 0.1, 11)
text = "2m"
[node name="Label3D26" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 10, 0.1, 11)
text = "4m"
[node name="CSGBox3D33" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0.5, 12.5)
use_collision = true
size = Vector3(4, 1, 1)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D34" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.5, 0.5, 12.25)
use_collision = true
size = Vector3(3, 1, 0.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D35" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0.5, 12.75)
use_collision = true
size = Vector3(4, 1, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D36" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0.5, 13)
use_collision = true
size = Vector3(4, 1, 2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D37" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0.5, 14)
use_collision = true
size = Vector3(4, 1, 4)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D38" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1, 20.5)
use_collision = true
size = Vector3(4, 2, 1)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D39" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.5, 1, 20.25)
use_collision = true
size = Vector3(3, 2, 0.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D40" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, 20.75)
use_collision = true
size = Vector3(4, 2, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D41" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 1, 21)
use_collision = true
size = Vector3(4, 2, 2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D42" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 1, 22)
use_collision = true
size = Vector3(4, 2, 4)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D43" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1.5, 28.5)
use_collision = true
size = Vector3(4, 3, 1)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D44" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.5, 1.5, 28.25)
use_collision = true
size = Vector3(3, 3, 0.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D45" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1.5, 28.75)
use_collision = true
size = Vector3(4, 3, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D46" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 1.5, 29)
use_collision = true
size = Vector3(4, 3, 2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D47" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 1.5, 30)
use_collision = true
size = Vector3(4, 3, 4)
material = ExtResource("3_vvhq3")
[node name="Label3D33" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, 13, 0.1, 36.5)
text = "4m"
[node name="Label3D34" type="Label3D" parent="Greybox/Mantles"]
transform = Transform3D(-5, 4.3711395e-07, 1.9106861e-14, 0, -2.18557e-07, 5, 4.3711395e-07, 5, 2.18557e-07, -11, 0.1, 36.5)
text = "4m"
[node name="CSGBox3D48" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 2, 36.5)
use_collision = true
size = Vector3(4, 4, 1)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D49" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.5, 2, 36.25)
use_collision = true
size = Vector3(3, 4, 0.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D53" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.5, 0.5, 12.125)
use_collision = true
size = Vector3(3, 1, 0.25)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D57" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -13, 3.5, -21.629175)
use_collision = true
size = Vector3(5, 1, 0.25)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D54" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.5, 1, 20.125)
use_collision = true
size = Vector3(3, 2, 0.25)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D55" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.5, 1.5, 28.125)
use_collision = true
size = Vector3(3, 3, 0.25)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D56" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.5, 2, 36.125)
use_collision = true
size = Vector3(3, 4, 0.25)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D50" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 36.75)
use_collision = true
size = Vector3(4, 4, 1.5)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D51" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 2, 37)
use_collision = true
size = Vector3(4, 4, 2)
material = ExtResource("3_vvhq3")
[node name="CSGBox3D52" type="CSGBox3D" parent="Greybox/Mantles"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 2, 38)
use_collision = true
size = Vector3(4, 4, 4)
material = ExtResource("3_vvhq3")

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=40 format=3 uid="uid://dmkw8cmalm5k"]
[gd_scene load_steps=45 format=3 uid="uid://dmkw8cmalm5k"]
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_2vsi6"]
[ext_resource type="Script" uid="uid://blenis2y55fmg" path="res://tools/city_helpers.gd" id="1_qwuk2"]
@@ -23,6 +23,10 @@
[ext_resource type="Texture2D" uid="uid://cjh5cnvdbq5ku" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_button_b_outline.svg" id="19_efsse"]
[ext_resource type="Texture2D" uid="uid://nrhxjdpuje3f" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_lt_outline.svg" id="20_crf87"]
[ext_resource type="Texture2D" uid="uid://dyjvbsvbriii4" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_rb_outline.svg" id="23_p287n"]
[ext_resource type="PackedScene" uid="uid://c305mfrtumcyq" path="res://scenes/spawners/spawner.tscn" id="24_qwuk2"]
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="25_nrosh"]
[ext_resource type="PackedScene" uid="uid://cmlud1hwkd6sv" path="res://scenes/enemies/flying_enemy/flying_enemy.tscn" id="25_x7fl1"]
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://components/movement/RMovement.cs" id="26_lu3yt"]
[sub_resource type="LabelSettings" id="LabelSettings_2k3fr"]
font_size = 30
@@ -49,7 +53,7 @@ size = Vector3(12, 11.5, 5)
size = Vector3(12, 13, 7)
[sub_resource type="BoxShape3D" id="BoxShape3D_lnjrw"]
size = Vector3(14, 15.5, 13.5)
size = Vector3(14, 10, 13.5)
[sub_resource type="BoxShape3D" id="BoxShape3D_3w3wd"]
size = Vector3(13, 16.5, 11.5)
@@ -89,6 +93,12 @@ adjustment_enabled = true
[sub_resource type="BoxMesh" id="BoxMesh_p287n"]
[sub_resource type="Resource" id="Resource_pxspk"]
script = ExtResource("26_lu3yt")
Speed = 7.0
TargetHeight = 15.0
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
[node name="Main" type="Node3D"]
script = ExtResource("1_qwuk2")
@@ -318,10 +328,9 @@ shape = SubResource("BoxShape3D_3wccx")
[node name="TutoDash2" parent="TutoTriggers" instance=ExtResource("16_qwuk2")]
transform = Transform3D(0.14133325, 0, 0.98996216, 0, 1, 0, -0.98996216, 0, 0.14133325, 28.885735, 27.749329, 25.360323)
first_input_texture = ExtResource("16_crf87")
second_input_texture = ExtResource("19_efsse")
complex_input_text = "in air"
tuto_text = "Dash"
first_input_texture = ExtResource("19_efsse")
complex_input_text = "against wall"
tuto_text = "Wall run"
[node name="CollisionShape3D" type="CollisionShape3D" parent="TutoTriggers/TutoDash2"]
transform = Transform3D(1.0000031, 0, -4.917383e-07, 0, 1, 0, 4.917383e-07, 0, 1.0000031, 5.500023, 5, 0)
@@ -333,7 +342,7 @@ collision_layer = 0
collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="TutoTriggers/TriggerTutoWeaponThrow"]
transform = Transform3D(0.9961947, 0, -0.08715595, 0, 1, 0, 0.08715595, 0, 0.9961947, 4.4208603, 7, -4.632329)
transform = Transform3D(0.9961947, 0, -0.08715595, 0, 1, 0, 0.08715595, 0, 0.9961947, 4.4208603, 9.75, -4.632329)
shape = SubResource("BoxShape3D_lnjrw")
[node name="TriggerTutoEnjoy" type="Area3D" parent="TutoTriggers"]
@@ -437,6 +446,17 @@ spot_range = 47.233
spot_angle = 18.85
spot_angle_attenuation = 10.556052
[node name="Spawner" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("24_qwuk2")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 19, 43, -111.5)
EnemyToSpawn = ExtResource("25_x7fl1")
MovementInputs = SubResource("Resource_pxspk")
Target = NodePath("../Player")
[node name="Spawner2" parent="." node_paths=PackedStringArray("Target") instance=ExtResource("24_qwuk2")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 31, 7.5, -88)
EnemyToSpawn = ExtResource("25_nrosh")
Target = NodePath("../Player")
[connection signal="timeout" from="TutorialController/WaitToShowBlockingTuto" to="TutorialController" method="_show_weapon_tutorial"]
[connection signal="body_exited" from="TutoTriggers/TriggerTutoMove" to="TutorialController" method="hide_tutorials"]
[connection signal="body_entered" from="TutoTriggers/TriggerTutoMantle" to="TutorialController" method="_on_tuto_mantle_body_entered"]

View File

@@ -1,34 +1,36 @@
[gd_scene load_steps=47 format=3 uid="uid://bei4nhkf8lwdo"]
[gd_scene load_steps=54 format=3 uid="uid://bei4nhkf8lwdo"]
[ext_resource type="Script" uid="uid://bbbrf5ckydfna" path="res://player_controller/Scripts/PlayerController.cs" id="1_poq2x"]
[ext_resource type="PackedScene" uid="uid://cf3rrgr1imvv4" path="res://scenes/path/path.tscn" id="2_6lejt"]
[ext_resource type="Resource" uid="uid://bl5crtu1gkrtr" path="res://systems/inputs/base_mode/base_mode.tres" id="3_cresl"]
[ext_resource type="Script" uid="uid://b0u23nkpaimyc" path="res://components/damage/CDamageable.cs" id="4_q7bng"]
[ext_resource type="Resource" uid="uid://cpdaw41ah5gic" path="res://systems/inputs/base_mode/rotate_y.tres" id="4_rxwoh"]
[ext_resource type="Resource" uid="uid://ccrb5xsnphc8" path="res://systems/inputs/base_mode/rotate_floorplane.tres" id="5_4u7i3"]
[ext_resource type="Script" uid="uid://b6y3ugfydvch0" path="res://components/damage/RDamageModifier.cs" id="5_q7bng"]
[ext_resource type="Resource" uid="uid://f3vs6l4m623s" path="res://systems/inputs/base_mode/move_left.tres" id="5_q14ux"]
[ext_resource type="Resource" uid="uid://t612lts1wi1s" path="res://systems/inputs/base_mode/move_right.tres" id="6_q7bng"]
[ext_resource type="Script" uid="uid://cwbvxlfvmocc1" path="res://player_controller/Scripts/StairsSystem.cs" id="7_bmt5a"]
[ext_resource type="Resource" uid="uid://brswsknpgwal2" path="res://systems/inputs/base_mode/move_front.tres" id="7_m8gvy"]
[ext_resource type="Resource" uid="uid://s1l0n1iitc6m" path="res://systems/inputs/base_mode/move_back.tres" id="8_jb43f"]
[ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://systems/inputs/base_mode/aim_release.tres" id="8_lhb11"]
[ext_resource type="Script" uid="uid://dd1yrt7eiiyf4" path="res://player_controller/Scripts/CapsuleCollider.cs" id="8_lmtjd"]
[ext_resource type="Resource" uid="uid://c3e0ivgaxrsyb" path="res://systems/inputs/base_mode/aim_down.tres" id="8_obsfv"]
[ext_resource type="PackedScene" uid="uid://wq1okogkhc5l" path="res://systems/mantle/mantle_system.tscn" id="8_qu4wy"]
[ext_resource type="Resource" uid="uid://7wm8ywvujwf" path="res://systems/inputs/base_mode/aim_cancel.tres" id="9_5p2qc"]
[ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://systems/inputs/base_mode/aim_pressed.tres" id="9_nob5r"]
[ext_resource type="Resource" uid="uid://bdit2jy5gbpts" path="res://systems/inputs/base_mode/jump.tres" id="10_4u7i3"]
[ext_resource type="Script" uid="uid://g8idirw62qe0" path="res://player_controller/Scripts/Bobbing.cs" id="10_7wk1w"]
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/empower_down.tres" id="10_nodcl"]
[ext_resource type="Resource" uid="uid://b5gx3q8nvu72e" path="res://systems/inputs/base_mode/hit.tres" id="11_cresl"]
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/empower_release.tres" id="11_ruloh"]
[ext_resource type="PackedScene" uid="uid://0ysqmqphq6mq" path="res://systems/head/head_system.tscn" id="11_rxwoh"]
[ext_resource type="Resource" uid="uid://d2r0ur8k3cuu3" path="res://systems/inputs/base_mode/dash.tres" id="12_34snm"]
[ext_resource type="Script" uid="uid://b6k73aj5povgv" path="res://player_controller/Scripts/FieldOfView.cs" id="12_m2mxi"]
[ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://systems/inputs/base_mode/jump_pressed.tres" id="13_nob5r"]
[ext_resource type="Shape3D" uid="uid://keseacdcooot" path="res://player_controller/resources/PlayerShape.tres" id="13_r7i3q"]
[ext_resource type="Resource" uid="uid://bw5k2gsv3jqcv" path="res://systems/inputs/base_mode/throw.tres" id="16_nob5r"]
[ext_resource type="Script" uid="uid://b5nk6ntlps3x0" path="res://systems/inputs/input_system.gd" id="16_v31n3"]
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/slide_released.tres" id="17_6lejt"]
[ext_resource type="Resource" uid="uid://htqvokm8mufq" path="res://systems/inputs/base_mode/move.tres" id="17_h6vvl"]
[ext_resource type="PackedScene" uid="uid://cqduhd4opgwvm" path="res://systems/dash/dash_system.tscn" id="18_q5h8a"]
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/slide_pressed.tres" id="18_q14ux"]
[ext_resource type="Resource" uid="uid://spo3pbqjx0eb" path="res://systems/inputs/base_mode/parry.tres" id="18_ruloh"]
[ext_resource type="Resource" uid="uid://dxy0071ic1wdj" path="res://systems/inputs/base_mode/slam.tres" id="20_nob5r"]
[ext_resource type="PackedScene" uid="uid://dbe5f0p6lvqtr" path="res://systems/tween_queue/tween_queue_system.tscn" id="22_rpwev"]
[ext_resource type="PackedScene" uid="uid://bcwkugn6v3oy7" path="res://addons/godot_state_charts/utilities/state_chart_debugger.tscn" id="24_q5h8a"]
[ext_resource type="Script" uid="uid://couw105c3bde4" path="res://addons/godot_state_charts/state_chart.gd" id="25_wv70j"]
@@ -43,9 +45,20 @@
[ext_resource type="Texture2D" uid="uid://chvt6g0xn5c2m" path="res://systems/dash/light-ring.jpg" id="32_lgpc8"]
[ext_resource type="Script" uid="uid://b4dwolbvt8our" path="res://addons/godot_state_charts/history_state.gd" id="41_ruloh"]
[sub_resource type="Resource" id="Resource_jb43f"]
script = ExtResource("5_q7bng")
Modifier = 3.0
metadata/_custom_type_script = "uid://b6y3ugfydvch0"
[sub_resource type="CapsuleMesh" id="CapsuleMesh_xc2g5"]
height = 1.7
[sub_resource type="SphereShape3D" id="SphereShape3D_6lejt"]
radius = 0.45
[sub_resource type="SphereShape3D" id="SphereShape3D_q14ux"]
radius = 1.0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nodcl"]
transparency = 1
albedo_color = Color(0, 0.627451, 0.6313726, 0.49019608)
@@ -56,42 +69,67 @@ top_radius = 0.2
bottom_radius = 0.2
height = 1.0
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_6lejt"]
radius = 1.0
height = 3.5
[sub_resource type="SphereShape3D" id="SphereShape3D_nob5r"]
radius = 0.4
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_2q0ik"]
blend_mode = 1
[node name="Player" type="CharacterBody3D"]
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("CDamage")]
collision_mask = 272
script = ExtResource("1_poq2x")
CDamage = NodePath("CDamageable")
WalkSpeed = 7.5
AccelerationAir = 2.0
DecelerationAir = 0.1
Weight = 5.0
MantleTime = 0.3
SimpleJumpStartVelocity = 8.0
AccelerationFloor = 4.0
DecelerationFloor = 3.0
AccelerationAir = 0.8
DecelerationAir = 0.02
Weight = 4.0
MantlePath = ExtResource("2_6lejt")
MantleDashStrength = 25.0
MantleJumpStartVelocity = 15.0
CoyoteTime = 0.3
InputBufferFrames = 5
SimpleJumpStartVelocity = 6.0
SimpleJumpHangTimeInFrames = 1
SimpleJumpGravityLesseningFactor = 2.5
DoubleJumpStartVelocity = 15.0
SimpleJumpGravityLesseningFactor = 2.0
DoubleJumpHangTimeInFrames = 3
DoubleJumpGravityLesseningFactor = 1.5
MegaJumpStartVelocity = 30.0
MegaJumpHangTimeInFrames = 12
MegaJumpGravityLesseningFactor = 1.2
WallJumpStartVelocity = 12.0
WallJumpStartVelocity = 8.0
MaxNumberOfEmpoweredActions = 3
SimpleDashStrength = 15.0
PoweredDashStrength = 30.0
SimpleDashStrength = 18.0
SimpleDashTime = 0.2
AimedDashTime = 0.2
PostDashSpeed = 30.0
SlamSpeed = 80.0
FlatGroundSlideSpeedLossRate = 0.996
GroundSlideJumpMultiplier = 0.1
GroundSlideJumpSpeedFactor = 0.1
GroundSlideDownSlopeAcceleration = 0.2
GroundSlideDownSlopeMaxSpeed = 30.0
AirGlideVSpeed = 4.0
AccelerationAirGlide = 0.4
AirGlideVerticalAcceleration = 8.0
AirGlideJumpMultiplier = 0.1
AirGlideJumpSpeedFactor = 0.05
WallHugGravityLesseningFactor = 15.0
WallHugDownwardMaxSpeed = 8.0
WallHugHorizontalDeceleration = 0.5
WallRunAltitudeLossSpeed = 12.0
WallRunSpeedThreshold = 5.0
WallHugDownwardMaxSpeed = 4.0
WallHugHorizontalDeceleration = 1.0
[node name="CDamageable" type="Node" parent="."]
script = ExtResource("4_q7bng")
DamageModifiers = Array[Object]([SubResource("Resource_jb43f")])
metadata/_custom_type_script = "uid://b0u23nkpaimyc"
[node name="WallRunSnapper" type="RayCast3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, 0, 0, 0)
target_position = Vector3(0, 0, -5)
collision_mask = 2
collision_mask = 256
[node name="InputController" type="Node3D" parent="."]
script = ExtResource("16_v31n3")
@@ -101,36 +139,57 @@ move_left = ExtResource("5_q14ux")
move_right = ExtResource("6_q7bng")
move_front = ExtResource("7_m8gvy")
move_back = ExtResource("8_jb43f")
rotate_y = ExtResource("4_rxwoh")
rotate_vertical = ExtResource("4_rxwoh")
rotate_floorplane = ExtResource("5_4u7i3")
aim_down = ExtResource("8_obsfv")
aim_pressed = ExtResource("9_nob5r")
aim_released = ExtResource("8_lhb11")
jump = ExtResource("10_4u7i3")
jump_pressed = ExtResource("13_nob5r")
empower_down = ExtResource("10_nodcl")
empower_released = ExtResource("11_ruloh")
aim_canceled = ExtResource("9_5p2qc")
slide_pressed = ExtResource("18_q14ux")
slide_released = ExtResource("17_6lejt")
hit = ExtResource("11_cresl")
parry = ExtResource("18_ruloh")
dash = ExtResource("12_34snm")
throw = ExtResource("16_nob5r")
slam = ExtResource("20_nob5r")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.85, 0)
visible = false
mesh = SubResource("CapsuleMesh_xc2g5")
[node name="CapsuleCollider" type="CollisionShape3D" parent="."]
[node name="StandingCollider" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.85, 0)
shape = ExtResource("13_r7i3q")
debug_color = Color(0, 0.6, 0.701961, 0.341176)
script = ExtResource("8_lmtjd")
CapsuleDefaultHeight = 1.7
[node name="SlideCollider" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.45, 0)
shape = SubResource("SphereShape3D_6lejt")
disabled = true
debug_color = Color(0, 0.6, 0.701961, 0.341176)
[node name="HeadSystem" parent="." instance=ExtResource("11_rxwoh")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
CameraInclineAcceleration = 20.0
GroundedCameraIncline = 3.0
SlidingJitterAmplitude = 0.2
[node name="MantleSystem" parent="HeadSystem" instance=ExtResource("8_qu4wy")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.6, 0)
MantleEndLocationDistanceFromWall = 0.3
MantleHeightCastStart = 2.5
[node name="WeaponHitbox" type="Area3D" parent="HeadSystem"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.6, 0)
collision_layer = 0
collision_mask = 16
monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="HeadSystem/WeaponHitbox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -1.5)
shape = SubResource("SphereShape3D_q14ux")
[node name="StairsSystem" type="Node3D" parent="."]
script = ExtResource("7_bmt5a")
@@ -138,13 +197,11 @@ script = ExtResource("7_bmt5a")
[node name="StairsAheadRayCast3D" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, -0.828)
target_position = Vector3(0, -0.55, 0)
collision_mask = 256
[node name="StairsBelowRayCast3D" type="RayCast3D" parent="."]
target_position = Vector3(0, -0.75, 0)
[node name="MantleSystem" parent="." instance=ExtResource("8_qu4wy")]
MantleEndLocationDistanceFromWall = 0.3
MantleHeightCastStart = 2.0
collision_mask = 256
[node name="Bobbing" type="Node3D" parent="."]
script = ExtResource("10_7wk1w")
@@ -153,22 +210,27 @@ script = ExtResource("10_7wk1w")
script = ExtResource("12_m2mxi")
[node name="HeadCollisionDetectors" type="Node3D" parent="."]
visible = false
[node name="HeadCollisionDetector0" type="RayCast3D" parent="HeadCollisionDetectors"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4, -0.210707)
target_position = Vector3(0, 1, 0)
collision_mask = 256
[node name="HeadCollisionDetector1" type="RayCast3D" parent="HeadCollisionDetectors"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4, 0.23061)
target_position = Vector3(0, 1, 0)
collision_mask = 256
[node name="HeadCollisionDetector2" type="RayCast3D" parent="HeadCollisionDetectors"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.296, 1.4, 0)
target_position = Vector3(0, 1, 0)
collision_mask = 256
[node name="HeadCollisionDetector3" type="RayCast3D" parent="HeadCollisionDetectors"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.296, 1.4, 0)
target_position = Vector3(0, 1, 0)
collision_mask = 256
[node name="TweenQueueSystem" parent="." instance=ExtResource("22_rpwev")]
@@ -177,39 +239,39 @@ script = ExtResource("27_n7qhm")
[node name="back" type="RayCast3D" parent="WallHugSystem"]
target_position = Vector3(0, 0, 1)
collision_mask = 2
collision_mask = 256
[node name="back2" type="RayCast3D" parent="WallHugSystem"]
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
target_position = Vector3(0, 0, 1)
collision_mask = 2
collision_mask = 256
[node name="front" type="RayCast3D" parent="WallHugSystem"]
target_position = Vector3(0, 0, -1)
collision_mask = 2
collision_mask = 256
[node name="front2" type="RayCast3D" parent="WallHugSystem"]
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
target_position = Vector3(0, 0, -1)
collision_mask = 2
collision_mask = 256
[node name="right" type="RayCast3D" parent="WallHugSystem"]
target_position = Vector3(1, 0, 0)
collision_mask = 2
collision_mask = 256
[node name="right2" type="RayCast3D" parent="WallHugSystem"]
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
target_position = Vector3(1, 0, 0)
collision_mask = 2
collision_mask = 256
[node name="left" type="RayCast3D" parent="WallHugSystem"]
target_position = Vector3(-1, 0, 0)
collision_mask = 2
collision_mask = 256
[node name="left2" type="RayCast3D" parent="WallHugSystem"]
transform = Transform3D(0.70710677, 0, 0.70710677, 0, 1, 0, -0.70710677, 0, 0.70710677, 0, 0, 0)
target_position = Vector3(-1, 0, 0)
collision_mask = 2
collision_mask = 256
[node name="DashSystem" parent="." instance=ExtResource("18_q5h8a")]
DashSpeed = 0.2
@@ -229,7 +291,27 @@ visible = false
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, 1, 0, -1, -4.371139e-08, 0, 0, -1)
mesh = SubResource("CylinderMesh_nodcl")
[node name="GroundDetector" type="ShapeCast3D" parent="."]
shape = SubResource("CapsuleShape3D_6lejt")
collision_mask = 256
[node name="CeilingDetector" type="ShapeCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)
enabled = false
shape = SubResource("SphereShape3D_nob5r")
target_position = Vector3(0, 0.4, 0)
collision_mask = 256
[node name="DirectGroundDetector" type="RayCast3D" parent="."]
target_position = Vector3(0, -2, 0)
collision_mask = 256
[node name="DashCooldown" type="Timer" parent="."]
wait_time = 0.8
one_shot = true
[node name="AirborneDashCooldown" type="Timer" parent="."]
wait_time = 0.5
one_shot = true
[node name="PowerCooldown" type="Timer" parent="."]
@@ -242,7 +324,6 @@ one_shot = true
ignore_time_scale = true
[node name="StateChartDebugger" parent="." instance=ExtResource("24_q5h8a")]
visible = false
offset_left = 1524.0
offset_top = 1.0
offset_right = -8.0
@@ -251,6 +332,7 @@ enabled = false
initial_node_to_watch = NodePath("../StateChart")
[node name="UI" type="Control" parent="."]
visible = false
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@@ -378,28 +460,6 @@ delay_in_seconds = "0.0"
[node name="Canceled" type="Node" parent="StateChart/Root/Aim"]
script = ExtResource("27_34snm")
[node name="Empower" type="Node" parent="StateChart/Root"]
script = ExtResource("26_infe6")
initial_state = NodePath("Off")
[node name="Off" type="Node" parent="StateChart/Root/Empower"]
script = ExtResource("27_34snm")
[node name="ToOn" type="Node" parent="StateChart/Root/Empower/Off"]
script = ExtResource("28_n7qhm")
to = NodePath("../../On")
event = &"empower_down"
delay_in_seconds = "0.0"
[node name="On" type="Node" parent="StateChart/Root/Empower"]
script = ExtResource("27_34snm")
[node name="ToOff" type="Node" parent="StateChart/Root/Empower/On"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Off")
event = &"empower_released"
delay_in_seconds = "0.0"
[node name="PowerReserve" type="Node" parent="StateChart/Root"]
script = ExtResource("26_infe6")
initial_state = NodePath("Full")
@@ -487,6 +547,33 @@ to = NodePath("../OnWall/Hanging")
event = &"to_planted"
delay_in_seconds = "0.0"
[node name="Grounded" type="Node" parent="StateChart/Root/Movement"]
script = ExtResource("27_34snm")
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Grounded"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Dashing/Dash")
event = &"dash"
delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Grounded"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Jump/SimpleJump")
event = &"jump"
delay_in_seconds = "0.0"
[node name="OnAirborne" type="Node" parent="StateChart/Root/Movement/Grounded"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Airborne/CoyoteEnabled")
event = &"start_falling"
delay_in_seconds = "0.0"
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Grounded"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Sliding/GroundSlide")
event = &"slide"
delay_in_seconds = "0.0"
[node name="Mantling" type="Node" parent="StateChart/Root/Movement"]
script = ExtResource("27_34snm")
@@ -496,53 +583,77 @@ to = NodePath("../../Grounded")
event = &"grounded"
delay_in_seconds = "0.0"
[node name="OnMantleOtherSide" type="Node" parent="StateChart/Root/Movement/Mantling"]
script = ExtResource("28_n7qhm")
to = NodePath("../../OnWall/Hugging")
event = &"on_wall"
delay_in_seconds = "0.0"
[node name="Slamming" type="Node" parent="StateChart/Root/Movement"]
script = ExtResource("27_34snm")
[node name="OnSlamEnded" type="Node" parent="StateChart/Root/Movement/Slamming"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Grounded")
event = &"grounded"
delay_in_seconds = "0.0"
[node name="Jump" type="Node" parent="StateChart/Root/Movement"]
script = ExtResource("26_infe6")
initial_state = NodePath("SimpleJump")
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Jump"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Dashing/Dash")
event = &"dash"
delay_in_seconds = "0.0"
[node name="OnMantle" type="Node" parent="StateChart/Root/Movement/Jump"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Mantling")
event = &"mantle"
delay_in_seconds = "0.0"
[node name="SimpleJump" type="Node" parent="StateChart/Root/Movement/Jump"]
script = ExtResource("27_34snm")
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/Jump/SimpleJump"]
script = ExtResource("28_n7qhm")
to = NodePath("../../MegaJump")
event = &"megajump"
delay_in_seconds = "0.0"
[node name="OnJumpEnded" type="Node" parent="StateChart/Root/Movement/Jump/SimpleJump"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Airborne/DoubleJumpEnabled")
event = &"jump_ended"
delay_in_seconds = "0.0"
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Jump/SimpleJump"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Sliding/AirGlideDoubleJumpEnabled")
event = &"slide"
delay_in_seconds = "0.0"
[node name="DoubleJump" type="Node" parent="StateChart/Root/Movement/Jump"]
script = ExtResource("27_34snm")
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/Jump/DoubleJump"]
script = ExtResource("28_n7qhm")
to = NodePath("../../MegaJump")
event = &"megajump"
delay_in_seconds = "0.0"
[node name="OnJumpEnded" type="Node" parent="StateChart/Root/Movement/Jump/DoubleJump"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Airborne/Falling")
event = &"jump_ended"
delay_in_seconds = "0.0"
[node name="MegaJump" type="Node" parent="StateChart/Root/Movement/Jump"]
script = ExtResource("27_34snm")
[node name="OnJumpEnded" type="Node" parent="StateChart/Root/Movement/Jump/MegaJump"]
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Jump/DoubleJump"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Airborne/Falling")
event = &"jump_ended"
to = NodePath("../../../Sliding/AirGlide")
event = &"slide"
delay_in_seconds = "0.0"
[node name="Dashing" type="Node" parent="StateChart/Root/Movement"]
script = ExtResource("26_infe6")
initial_state = NodePath("Dash")
[node name="OnDashEndedGrounded" type="Node" parent="StateChart/Root/Movement/Dashing"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Grounded")
event = &"grounded"
delay_in_seconds = "0.0"
[node name="OnDashEnded" type="Node" parent="StateChart/Root/Movement/Dashing"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Airborne/Reset")
@@ -567,33 +678,112 @@ script = ExtResource("27_34snm")
[node name="ToWeaponDash" type="Node" parent="StateChart/Root/Movement/Dashing"]
script = ExtResource("27_34snm")
[node name="Grounded" type="Node" parent="StateChart/Root/Movement"]
script = ExtResource("27_34snm")
[node name="Sliding" type="Node" parent="StateChart/Root/Movement"]
script = ExtResource("26_infe6")
initial_state = NodePath("GroundSlide")
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Grounded"]
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Sliding"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Dashing/Dash")
event = &"dash"
event = &"actually_no_dash"
delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Grounded"]
[node name="OnMantle" type="Node" parent="StateChart/Root/Movement/Sliding"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Jump/SimpleJump")
to = NodePath("../../Mantling")
event = &"mantle"
delay_in_seconds = "0.0"
[node name="GroundSlide" type="Node" parent="StateChart/Root/Movement/Sliding"]
script = ExtResource("27_34snm")
[node name="OnSlideReleased" type="Node" parent="StateChart/Root/Movement/Sliding/GroundSlide"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Grounded")
event = &"slide_released"
delay_in_seconds = "0.0"
[node name="OnAirborne" type="Node" parent="StateChart/Root/Movement/Sliding/GroundSlide"]
script = ExtResource("28_n7qhm")
to = NodePath("../../AirGlideDoubleJumpEnabled")
event = &"start_falling"
delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Sliding/GroundSlide"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Jump/SimpleJump")
event = &"jump"
delay_in_seconds = "0.0"
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/Grounded"]
[node name="OnCancel" type="Node" parent="StateChart/Root/Movement/Sliding/GroundSlide"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Jump/MegaJump")
event = &"megajump"
to = NodePath("../../SlideCanceled")
event = &"slide_canceled"
delay_in_seconds = "0.0"
[node name="OnAirborne" type="Node" parent="StateChart/Root/Movement/Grounded"]
[node name="AirGlideDoubleJumpEnabled" type="Node" parent="StateChart/Root/Movement/Sliding"]
script = ExtResource("27_34snm")
[node name="OnSlideReleased" type="Node" parent="StateChart/Root/Movement/Sliding/AirGlideDoubleJumpEnabled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Airborne/CoyoteEnabled")
to = NodePath("../../../Airborne/Reset")
event = &"slide_released"
delay_in_seconds = "0.0"
[node name="OnGrounded" type="Node" parent="StateChart/Root/Movement/Sliding/AirGlideDoubleJumpEnabled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../GroundSlide")
event = &"grounded"
delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Sliding/AirGlideDoubleJumpEnabled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Jump/DoubleJump")
event = &"jump"
delay_in_seconds = "0.0"
[node name="AirGlide" type="Node" parent="StateChart/Root/Movement/Sliding"]
script = ExtResource("27_34snm")
[node name="OnSlideReleased" type="Node" parent="StateChart/Root/Movement/Sliding/AirGlide"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Airborne/Reset")
event = &"slide_released"
delay_in_seconds = "0.0"
[node name="OnGrounded" type="Node" parent="StateChart/Root/Movement/Sliding/AirGlide"]
script = ExtResource("28_n7qhm")
to = NodePath("../../GroundSlide")
event = &"grounded"
delay_in_seconds = "0.0"
[node name="SlideCanceled" type="Node" parent="StateChart/Root/Movement/Sliding"]
script = ExtResource("27_34snm")
[node name="OnAirborne" type="Node" parent="StateChart/Root/Movement/Sliding/SlideCanceled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Airborne/CoyoteEnabled")
event = &"start_falling"
delay_in_seconds = "0.0"
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/Sliding/SlideCanceled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Dashing/Dash")
event = &"dash"
delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Sliding/SlideCanceled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Jump/SimpleJump")
event = &"jump"
delay_in_seconds = "0.0"
[node name="OnSlideReleased" type="Node" parent="StateChart/Root/Movement/Sliding/SlideCanceled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Grounded")
event = &"slide_released"
delay_in_seconds = "0.0"
[node name="Airborne" type="Node" parent="StateChart/Root/Movement"]
script = ExtResource("26_infe6")
initial_state = NodePath("CoyoteEnabled")
@@ -602,12 +792,6 @@ initial_state = NodePath("CoyoteEnabled")
script = ExtResource("41_ruloh")
default_state = NodePath("../CoyoteEnabled")
[node name="OnWallHug" type="Node" parent="StateChart/Root/Movement/Airborne"]
script = ExtResource("28_n7qhm")
to = NodePath("../../OnWall/Hugging")
event = &"wall_hug"
delay_in_seconds = "0.0"
[node name="OnWallRun" type="Node" parent="StateChart/Root/Movement/Airborne"]
script = ExtResource("28_n7qhm")
to = NodePath("../../OnWall/Running")
@@ -626,13 +810,19 @@ to = NodePath("../../Grounded")
event = &"grounded"
delay_in_seconds = "0.0"
[node name="OnSlam" type="Node" parent="StateChart/Root/Movement/Airborne"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Slamming")
event = &"slam"
delay_in_seconds = "0.0"
[node name="CoyoteEnabled" type="Node" parent="StateChart/Root/Movement/Airborne"]
script = ExtResource("27_34snm")
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/Airborne/CoyoteEnabled"]
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Airborne/CoyoteEnabled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Jump/MegaJump")
event = &"megajump"
to = NodePath("../../../Sliding/AirGlideDoubleJumpEnabled")
event = &"slide"
delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Airborne/CoyoteEnabled"]
@@ -650,10 +840,16 @@ delay_in_seconds = "0.0"
[node name="DoubleJumpEnabled" type="Node" parent="StateChart/Root/Movement/Airborne"]
script = ExtResource("27_34snm")
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"]
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Jump/MegaJump")
event = &"megajump"
to = NodePath("../../../Sliding/AirGlideDoubleJumpEnabled")
event = &"slide"
delay_in_seconds = "0.0"
[node name="OnWallHug" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../OnWall/Hugging")
event = &"wall_hug"
delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"]
@@ -665,70 +861,100 @@ delay_in_seconds = "0.0"
[node name="Falling" type="Node" parent="StateChart/Root/Movement/Airborne"]
script = ExtResource("27_34snm")
[node name="OnSlide" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Sliding/AirGlide")
event = &"slide"
delay_in_seconds = "0.0"
[node name="OnWallHug" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../OnWall/Hugging")
event = &"wall_hug"
delay_in_seconds = "0.0"
[node name="ToDoubleJump" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"]
script = ExtResource("28_n7qhm")
to = NodePath("../../DoubleJumpEnabled")
event = &"enable_double_jump"
delay_in_seconds = "0.0"
[node name="OnWallJump" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Jump/DoubleJump")
event = &"wall_jump"
delay_in_seconds = "0.0"
[node name="OnWall" type="Node" parent="StateChart/Root/Movement"]
script = ExtResource("26_infe6")
initial_state = NodePath("Hugging")
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Dashing/Dash")
event = &"dash"
delay_in_seconds = "0.0"
[node name="OnGrounded" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Grounded")
event = &"grounded"
delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Jump/SimpleJump")
event = &"jump"
delay_in_seconds = "0.0"
[node name="OnMegajump" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Jump/MegaJump")
event = &"megajump"
delay_in_seconds = "0.0"
[node name="OnLeaveWall" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Airborne/Reset")
event = &"start_falling"
delay_in_seconds = "0.0"
[node name="OnMantle" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Mantling")
event = &"mantle"
delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Jump/SimpleJump")
event = &"jump"
delay_in_seconds = "0.0"
[node name="Hugging" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("27_34snm")
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/OnWall/Hugging"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Dashing/Dash")
event = &"dash"
delay_in_seconds = "0.0"
[node name="Hanging" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("27_34snm")
[node name="OnDash" type="Node" parent="StateChart/Root/Movement/OnWall/Hanging"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Dashing/Dash")
event = &"dash"
delay_in_seconds = "0.0"
[node name="Running" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("27_34snm")
[connection signal="input_aim_canceled" from="InputController" to="." method="OnInputAimCanceled"]
[node name="OnLeaveWall" type="Node" parent="StateChart/Root/Movement/OnWall/Running"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Airborne/CoyoteEnabled")
event = &"start_falling"
delay_in_seconds = "0.0"
[connection signal="input_aim_down" from="InputController" to="." method="OnInputAimDown"]
[connection signal="input_aim_pressed" from="InputController" to="." method="OnInputAimPressed"]
[connection signal="input_aim_released" from="InputController" to="." method="OnInputAimReleased"]
[connection signal="input_dash" from="InputController" to="." method="OnInputDashPressed"]
[connection signal="input_device_changed" from="InputController" to="." method="InputDeviceChanged"]
[connection signal="input_empower_down" from="InputController" to="." method="OnInputEmpowerDown"]
[connection signal="input_empower_released" from="InputController" to="." method="OnInputEmpowerReleased"]
[connection signal="input_hit" from="InputController" to="." method="OnInputHitPressed"]
[connection signal="input_jump_ended" from="InputController" to="." method="OnInputJumpEnded"]
[connection signal="input_jump_ongoing" from="InputController" to="." method="OnInputJumpOngoing"]
[connection signal="input_jump_started" from="InputController" to="." method="OnInputJumpStarted"]
[connection signal="input_move" from="InputController" to="." method="OnInputMove"]
[connection signal="input_move_keyboard" from="InputController" to="." method="OnInputMoveKeyboard"]
[connection signal="input_parry" from="InputController" to="." method="OnInputParryPressed"]
[connection signal="input_rotate_floorplane" from="InputController" to="." method="OnInputRotateFloorplane"]
[connection signal="input_rotate_y" from="InputController" to="." method="OnInputRotateY"]
[connection signal="input_throw" from="InputController" to="." method="OnInputThrowPressed"]
[connection signal="input_slam" from="InputController" to="." method="OnInputSlamPressed"]
[connection signal="input_slide_ended" from="InputController" to="." method="OnInputSlideEnded"]
[connection signal="input_slide_started" from="InputController" to="." method="OnInputSlideStarted"]
[connection signal="WallDetected" from="WallHugSystem" to="." method="OnWallDetected"]

View File

@@ -40,17 +40,13 @@ public partial class CapsuleCollider : CollisionShape3D
return Mathf.IsEqualApprox(_shape.Height, CapsuleCrouchHeight);
}
public void Crouch(float delta, float crouchTransitionSpeed)
public void Crouch()
{
_shape.Height -= delta * crouchTransitionSpeed;
_shape.Height = Mathf.Clamp(_shape.Height, CapsuleCrouchHeight, CapsuleDefaultHeight);
_shape.Height = CapsuleCrouchHeight;
}
public void UndoCrouching(float delta, float crouchTransitionSpeed)
public void Uncrouch()
{
_shape.Height += delta * crouchTransitionSpeed;
_shape.Height = Mathf.Clamp(_shape.Height, CapsuleCrouchHeight, CapsuleDefaultHeight);
_shape.Height = CapsuleDefaultHeight;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -146,6 +146,16 @@ aim_dash={
locale/translations=PackedStringArray("res://addons/maaacks_game_template/base/translations/menus_translations.en.translation", "res://addons/maaacks_game_template/base/translations/menus_translations.fr.translation")
[layer_names]
3d_physics/layer_1="Player"
3d_physics/layer_2="2"
3d_physics/layer_3="3"
3d_physics/layer_4="4"
3d_physics/layer_5="enemies"
3d_physics/layer_9="terrain"
3d_physics/layer_17="weapon"
[maaacks_game_template]
disable_update_check=false
@@ -154,6 +164,7 @@ copy_path="res://scenes"
[physics]
3d/run_on_separate_thread=true
common/physics_jitter_fix=0.0
3d/physics_engine="Jolt Physics"
common/physics_interpolation=true
@@ -161,5 +172,6 @@ common/physics_interpolation=true
[rendering]
textures/vram_compression/import_etc2_astc=true
lights_and_shadows/directional_shadow/soft_shadow_filter_quality=5
environment/volumetric_fog/volume_size=256
environment/volumetric_fog/volume_depth=256

154
scenes/enemies/Enemy.cs Normal file
View File

@@ -0,0 +1,154 @@
using System;
using Godot;
using Movementtests.interfaces;
[GlobalClass]
public partial class Enemy : CharacterBody3D,
IDamageable,
IDamageDealer,
IHealthable,
IKillable,
IMoveable,
ISpawnable,
IKnockbackable
{
// Signals and events
public event Action<IDamageable, DamageRecord> DamageTaken;
public event Action<IHealthable, float> HealthChanged;
public event Action<IHealthable> HealthDepleted;
// Public export components
[Export]
public Node3D Target { get; set; }
[ExportGroup("Health")]
[Export]
public Node CHealth { get; set; }
[Export]
public RHealth RHealth { get; set; }
[Export]
public RDeathEffect[] DeathEffects { get; set; }
[ExportGroup("Damage")]
[Export]
public Node CDamage { get; set; }
[Export]
public RDamage RDamage { get; set; }
[Export]
public Node CKnockback { get; set; }
[Export]
public RKnockback RKnockback { get; set; }
[ExportGroup("Movement")]
[Export]
public Node CMovement { get; set; }
[Export]
public RMovement RMovement { get; set; }
// Public stuff
public float CurrentHealth { get; set; }
// Private stuff
private Area3D _damageBox;
public override void _Ready()
{
Initialize();
SetupSignals();
}
public void Initialize()
{
_damageBox = GetNode<Area3D>("DamageBox");
if (CMovement is IMoveable moveable && RMovement != null) moveable.RMovement = RMovement;
if (CHealth is IHealthable healthable && RHealth != null)
{
healthable.RHealth = RHealth;
healthable.CurrentHealth = RHealth.StartingHealth;
}
if (CKnockback is IKnockbackable knockbackable && RKnockback != null) knockbackable.RKnockback = RKnockback;
}
public void SetupSignals()
{
_damageBox.BodyEntered += OnDamageBoxTriggered;
if (CDamage is IDamageable damageable)
{
damageable.DamageTaken += ReduceHealth;
damageable.DamageTaken += RegisterKnockback;
}
if (CHealth is IHealthable healthable) healthable.HealthDepleted += Kill;
}
public override void _PhysicsProcess(double delta)
{
var targetPlanar = new Vector3(Target.GlobalPosition.X, GlobalPosition.Y, Target.GlobalPosition.Z);
LookAt(targetPlanar);
var inputs = new MovementInputs(
Velocity: Velocity,
TargetLocation: Target.GlobalPosition,
isOnFloor: IsOnFloor(),
gravity: GetGravity(),
delta: delta
);
Velocity = ComputeVelocity(inputs);
Velocity += ComputeKnockback();
MoveAndSlide();
}
public Vector3 ComputeVelocity(MovementInputs inputs)
{
if (CMovement is not IMoveable movement) return Vector3.Zero;
return movement!.ComputeVelocity(inputs);
}
public void OnDamageBoxTriggered(Node3D body)
{
if (body is not IDamageable damageable) return;
var damageRecord = new DamageRecord(this, RDamage);
damageable.TakeDamage(damageRecord);
}
public DamageRecord TakeDamage(DamageRecord damageRecord)
{
if (CDamage is not IDamageable damageable)
return damageRecord with { Damage = new RDamage(0, damageRecord.Damage.DamageType) };
var finalDamage = damageable.TakeDamage(damageRecord);
DamageTaken?.Invoke(this, finalDamage);
GD.Print($"Received damage: {finalDamage.Damage.DamageDealt}");
return finalDamage;
}
public void ReduceHealth(IDamageable source, DamageRecord damageRecord)
{
if (CHealth is not IHealthable healthable) return;
healthable.ReduceHealth(source, damageRecord);
}
public void Kill(IHealthable source)
{
foreach (var killable in DeathEffects.ToIKillables())
{
killable.Kill(source);
}
QueueFree();
}
public void RegisterKnockback(IDamageable source, DamageRecord damageRecord)
{
if (CKnockback is not IKnockbackable knockbackable) return;
knockbackable.RegisterKnockback(source, damageRecord);
}
public Vector3 ComputeKnockback()
{
if (CKnockback is not IKnockbackable knockbackable) return Vector3.Zero;
return knockbackable.ComputeKnockback();
}
}

View File

@@ -0,0 +1 @@
uid://bn7sc6id7n166

View File

@@ -0,0 +1,111 @@
[gd_scene load_steps=20 format=3 uid="uid://cmlud1hwkd6sv"]
[ext_resource type="Script" uid="uid://bn7sc6id7n166" path="res://scenes/enemies/Enemy.cs" id="1_q8l7o"]
[ext_resource type="Script" uid="uid://b6y3ugfydvch0" path="res://components/damage/RDamageModifier.cs" id="2_1bsgx"]
[ext_resource type="Resource" uid="uid://dg1xbjhyhgnnk" path="res://scenes/enemies/flying_enemy/flying_enemy_health.tres" id="2_ma2bq"]
[ext_resource type="Resource" uid="uid://dgo65k2ceqfvy" path="res://scenes/enemies/flying_enemy/flying_enemy_damage.tres" id="2_on7rt"]
[ext_resource type="Resource" uid="uid://bwqjaom4k7rc3" path="res://scenes/enemies/flying_enemy/flying_enemy_movement.tres" id="4_dejyg"]
[ext_resource type="Script" uid="uid://bjwrpv3jpsc1e" path="res://components/health/CHealth.cs" id="4_ys4jv"]
[ext_resource type="PackedScene" uid="uid://dmw5ibwrb483f" path="res://components/movement/CFlyingMovement.tscn" id="7_vaeds"]
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://components/movement/RMovement.cs" id="8_on7rt"]
[ext_resource type="Script" uid="uid://b0u23nkpaimyc" path="res://components/damage/CDamageable.cs" id="8_uotso"]
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://components/knockback/CKnockback.tscn" id="10_dejyg"]
[ext_resource type="Resource" uid="uid://dt7a1io5o0b8s" path="res://scenes/enemies/flying_enemy/flying_enemy_knockback.tres" id="11_mpa2u"]
[sub_resource type="Resource" id="Resource_jnv07"]
script = ExtResource("2_1bsgx")
metadata/_custom_type_script = "uid://b6y3ugfydvch0"
[sub_resource type="Resource" id="Resource_53j1c"]
script = ExtResource("2_1bsgx")
DamageType = 1
metadata/_custom_type_script = "uid://b6y3ugfydvch0"
[sub_resource type="Resource" id="Resource_on7rt"]
script = ExtResource("8_on7rt")
Speed = 3.0
TargetHeight = 10.0
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
[sub_resource type="SphereShape3D" id="SphereShape3D_b46rq"]
[sub_resource type="SphereMesh" id="SphereMesh_1bsgx"]
[sub_resource type="SphereMesh" id="SphereMesh_4yfjf"]
radius = 0.05
height = 0.1
radial_segments = 4
rings = 4
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4yfjf"]
albedo_color = Color(0.06469653, 0.06469653, 0.06469653, 1)
[sub_resource type="BoxShape3D" id="BoxShape3D_4yfjf"]
size = Vector3(1, 1, 1.5)
[node name="FlyingEnemy" type="CharacterBody3D" node_paths=PackedStringArray("CHealth", "CDamage", "CKnockback", "CMovement")]
collision_layer = 16
collision_mask = 273
motion_mode = 1
script = ExtResource("1_q8l7o")
CHealth = NodePath("CHealth")
RHealth = ExtResource("2_ma2bq")
DeathEffects = Array[Object]([])
CDamage = NodePath("CDamageable")
RDamage = ExtResource("2_on7rt")
CKnockback = NodePath("CKnockback")
RKnockback = ExtResource("11_mpa2u")
CMovement = NodePath("CFlyingMovement")
RMovement = ExtResource("4_dejyg")
[node name="CHealth" type="Node" parent="."]
script = ExtResource("4_ys4jv")
RHealth = ExtResource("2_ma2bq")
metadata/_custom_type_script = "uid://bjwrpv3jpsc1e"
[node name="CDamageable" type="Node" parent="."]
script = ExtResource("8_uotso")
DamageModifiers = Array[Object]([SubResource("Resource_jnv07"), SubResource("Resource_53j1c")])
metadata/_custom_type_script = "uid://b0u23nkpaimyc"
[node name="CFlyingMovement" parent="." instance=ExtResource("7_vaeds")]
RMovement = SubResource("Resource_on7rt")
TerrainCollision = 256
[node name="CKnockback" parent="." instance=ExtResource("10_dejyg")]
RKnockback = ExtResource("11_mpa2u")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_b46rq")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
layers = 33
mesh = SubResource("SphereMesh_1bsgx")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.2, 0, -0.5)
layers = 33
cast_shadow = 0
ignore_occlusion_culling = true
mesh = SubResource("SphereMesh_4yfjf")
surface_material_override/0 = SubResource("StandardMaterial3D_4yfjf")
[node name="MeshInstance3D3" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.2, 0, -0.5)
layers = 33
cast_shadow = 0
ignore_occlusion_culling = true
mesh = SubResource("SphereMesh_4yfjf")
surface_material_override/0 = SubResource("StandardMaterial3D_4yfjf")
[node name="GroundDistance" type="RayCast3D" parent="."]
target_position = Vector3(0, 0, 0)
collision_mask = 272
[node name="DamageBox" type="Area3D" parent="."]
collision_layer = 0
monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="DamageBox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.75)
shape = SubResource("BoxShape3D_4yfjf")

View File

@@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="RDamage" load_steps=2 format=3 uid="uid://dgo65k2ceqfvy"]
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://components/damage/RDamage.cs" id="1_h6law"]
[resource]
script = ExtResource("1_h6law")
DamageType = 3
metadata/_custom_type_script = "uid://jitubgv6judn"

View File

@@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="RHealth" load_steps=2 format=3 uid="uid://dg1xbjhyhgnnk"]
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://components/health/RHealth.cs" id="1_jht15"]
[resource]
script = ExtResource("1_jht15")
StartingHealth = 50.0
metadata/_custom_type_script = "uid://baiapod3csndf"

View File

@@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="RKnockback" load_steps=2 format=3 uid="uid://dt7a1io5o0b8s"]
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://components/knockback/RKnockback.cs" id="1_yq03x"]
[resource]
script = ExtResource("1_yq03x")
Modifier = 10.0
metadata/_custom_type_script = "uid://b44cse62qru7j"

View File

@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="RMovement" load_steps=2 format=3 uid="uid://bwqjaom4k7rc3"]
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://components/movement/RMovement.cs" id="1_3yq0a"]
[resource]
script = ExtResource("1_3yq0a")
Speed = 3.0
Acceleration = 5.0
TargetHeight = 10.0
metadata/_custom_type_script = "uid://dtpxijlnb2c5"

View File

@@ -0,0 +1,107 @@
[gd_scene load_steps=19 format=3 uid="uid://dxt0e2ugmttqq"]
[ext_resource type="Script" uid="uid://bn7sc6id7n166" path="res://scenes/enemies/Enemy.cs" id="1_r6506"]
[ext_resource type="Resource" uid="uid://otfc2snh8umc" path="res://scenes/enemies/grounded_enemy/grounded_enemy_damage.tres" id="2_bn56u"]
[ext_resource type="Script" uid="uid://bjwrpv3jpsc1e" path="res://components/health/CHealth.cs" id="2_gsmti"]
[ext_resource type="Script" uid="uid://b6y3ugfydvch0" path="res://components/damage/RDamageModifier.cs" id="2_r3cnf"]
[ext_resource type="Resource" uid="uid://bohbojc68j7y1" path="res://scenes/enemies/grounded_enemy/grounded_enemy_health.tres" id="2_w4lm8"]
[ext_resource type="Resource" uid="uid://bqq6uukbdfysr" path="res://scenes/enemies/grounded_enemy/grounded_enemy_movement.tres" id="4_na24f"]
[ext_resource type="Script" uid="uid://b0u23nkpaimyc" path="res://components/damage/CDamageable.cs" id="7_1tw73"]
[ext_resource type="PackedScene" uid="uid://dbr7ioio158ew" path="res://components/movement/CGroundedMovement.tscn" id="7_qyswd"]
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://components/movement/RMovement.cs" id="8_6d4gl"]
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://components/knockback/CKnockback.tscn" id="10_jqqi6"]
[ext_resource type="Resource" uid="uid://cektf6waf4s04" path="res://scenes/enemies/grounded_enemy/grounded_enemy_knockback.tres" id="11_8k3xb"]
[sub_resource type="Resource" id="Resource_qj0ob"]
script = ExtResource("2_r3cnf")
Modifier = 3.0
metadata/_custom_type_script = "uid://b6y3ugfydvch0"
[sub_resource type="Resource" id="Resource_6d4gl"]
script = ExtResource("8_6d4gl")
Speed = 5.0
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_62kkh"]
[sub_resource type="CapsuleMesh" id="CapsuleMesh_3uydm"]
[sub_resource type="SphereMesh" id="SphereMesh_4yfjf"]
radius = 0.05
height = 0.1
radial_segments = 4
rings = 4
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4yfjf"]
albedo_color = Color(0.06469653, 0.06469653, 0.06469653, 1)
[sub_resource type="BoxShape3D" id="BoxShape3D_4yfjf"]
size = Vector3(1, 2, 2)
[node name="GroundedEnemy" type="CharacterBody3D" node_paths=PackedStringArray("CHealth", "CDamage", "CKnockback", "CMovement")]
collision_layer = 16
collision_mask = 273
script = ExtResource("1_r6506")
CHealth = NodePath("CHealth")
RHealth = ExtResource("2_w4lm8")
DeathEffects = Array[Object]([])
CDamage = NodePath("CDamageable")
RDamage = ExtResource("2_bn56u")
CKnockback = NodePath("CKnockback")
RKnockback = ExtResource("11_8k3xb")
CMovement = NodePath("CGroundedMovement")
RMovement = ExtResource("4_na24f")
[node name="CHealth" type="Node" parent="."]
script = ExtResource("2_gsmti")
RHealth = ExtResource("2_w4lm8")
metadata/_custom_type_script = "uid://bjwrpv3jpsc1e"
[node name="CDamageable" type="Node" parent="."]
script = ExtResource("7_1tw73")
DamageModifiers = Array[Object]([SubResource("Resource_qj0ob")])
metadata/_custom_type_script = "uid://b0u23nkpaimyc"
[node name="CGroundedMovement" parent="." node_paths=PackedStringArray("WallInFrontRayCast") instance=ExtResource("7_qyswd")]
RMovement = SubResource("Resource_6d4gl")
WallInFrontRayCast = NodePath("../WallInFrontRayCast")
[node name="CKnockback" parent="." instance=ExtResource("10_jqqi6")]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_62kkh")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
layers = 33
mesh = SubResource("CapsuleMesh_3uydm")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.2, 1.5, -0.5)
layers = 33
cast_shadow = 0
ignore_occlusion_culling = true
mesh = SubResource("SphereMesh_4yfjf")
surface_material_override/0 = SubResource("StandardMaterial3D_4yfjf")
[node name="MeshInstance3D3" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.2, 1.5, -0.5)
layers = 33
cast_shadow = 0
ignore_occlusion_culling = true
mesh = SubResource("SphereMesh_4yfjf")
surface_material_override/0 = SubResource("StandardMaterial3D_4yfjf")
[node name="WallInFrontRayCast" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
target_position = Vector3(0, 0, -1.5)
collision_mask = 272
[node name="DamageBox" type="Area3D" parent="."]
collision_layer = 0
monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="DamageBox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -0.5)
shape = SubResource("BoxShape3D_4yfjf")

View File

@@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="RDamage" load_steps=2 format=3 uid="uid://otfc2snh8umc"]
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://components/damage/RDamage.cs" id="1_y415a"]
[resource]
script = ExtResource("1_y415a")
DamageDealt = 2.0
metadata/_custom_type_script = "uid://jitubgv6judn"

View File

@@ -0,0 +1,7 @@
[gd_resource type="Resource" script_class="RHealth" load_steps=2 format=3 uid="uid://bohbojc68j7y1"]
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://components/health/RHealth.cs" id="1_h6jgd"]
[resource]
script = ExtResource("1_h6jgd")
metadata/_custom_type_script = "uid://baiapod3csndf"

View File

@@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="RKnockback" load_steps=2 format=3 uid="uid://cektf6waf4s04"]
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://components/knockback/RKnockback.cs" id="1_vdia8"]
[resource]
script = ExtResource("1_vdia8")
Modifier = 10.0
metadata/_custom_type_script = "uid://b44cse62qru7j"

View File

@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="RMovement" load_steps=2 format=3 uid="uid://bqq6uukbdfysr"]
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://components/movement/RMovement.cs" id="1_hsy8g"]
[resource]
script = ExtResource("1_hsy8g")
Speed = 5.0
Acceleration = 3.0
GravityModifier = 5.0
metadata/_custom_type_script = "uid://dtpxijlnb2c5"

25
scenes/path/Path.cs Normal file
View File

@@ -0,0 +1,25 @@
using Godot;
public partial class Path : Path3D
{
public PathFollow3D PathFollow { get; private set; }
public Marker3D Target { get; private set; }
public override void _Ready()
{
PathFollow = GetNode<PathFollow3D>("PathFollow");
Target = GetNode<Marker3D>("PathFollow/Target");
}
public void Setup(Transform3D globalTransform, Curve3D curve)
{
SetGlobalTransform(globalTransform);
SetCurve(curve);
PathFollow.ProgressRatio = 0;
}
public void Teardown()
{
if (!IsQueuedForDeletion()) QueueFree();
}
}

1
scenes/path/Path.cs.uid Normal file
View File

@@ -0,0 +1 @@
uid://djdr5bvfc8f0x

13
scenes/path/path.tscn Normal file
View File

@@ -0,0 +1,13 @@
[gd_scene load_steps=3 format=3 uid="uid://cf3rrgr1imvv4"]
[ext_resource type="Script" uid="uid://djdr5bvfc8f0x" path="res://scenes/path/Path.cs" id="1_kmlhi"]
[sub_resource type="Curve3D" id="Curve3D_u4rfr"]
[node name="Path" type="Path3D"]
curve = SubResource("Curve3D_u4rfr")
script = ExtResource("1_kmlhi")
[node name="PathFollow" type="PathFollow3D" parent="."]
[node name="Target" type="Marker3D" parent="PathFollow"]

View File

@@ -0,0 +1,69 @@
using Godot;
using System;
public partial class Spawner : Node3D
{
[Export(PropertyHint.NodeType)]
public PackedScene EnemyToSpawn { get; set; }
[Export]
public RMovement MovementInputs { get; set; }
[Export]
public RHealth HealthInputs { get; set; }
[Export]
public RDamage DamageInputs { get; set; }
[Export]
public Node3D Target { get; set; }
[Export(PropertyHint.Range, "0.1, 100, 0.1, or_greater")]
public float SpawnInterval { get; set; } = 1.0f;
[Export]
public bool IsActiveOnStart { get; set; } = true;
private float _spawnTimer;
private bool _isActive;
public override void _Ready()
{
_isActive = IsActiveOnStart;
_spawnTimer = SpawnInterval;
}
public override void _Process(double delta)
{
if (!_isActive) return;
_spawnTimer -= (float) delta;
if (_spawnTimer <= 0) Spawn();
}
public void Spawn()
{
if (EnemyToSpawn == null || !EnemyToSpawn.CanInstantiate()) return;
if (EnemyToSpawn.Instantiate() is not Enemy spawnedInstance) return;
spawnedInstance.Target = Target;
spawnedInstance.RMovement = MovementInputs;
spawnedInstance.RDamage = DamageInputs;
spawnedInstance.RHealth = HealthInputs;
spawnedInstance.Initialize();
GetTree().GetCurrentScene().AddChild(spawnedInstance);
spawnedInstance.GlobalPosition = GlobalPosition;
_spawnTimer = SpawnInterval;
}
public void StartSpawning()
{
_isActive = true;
_spawnTimer = SpawnInterval;
}
public void StopSpawning()
{
_isActive = false;
}
}

View File

@@ -0,0 +1 @@
uid://djyspwixi01j5

View File

@@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://c305mfrtumcyq"]
[ext_resource type="Script" uid="uid://djyspwixi01j5" path="res://scenes/spawners/Spawner.cs" id="1_2otbo"]
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="2_2otbo"]
[node name="Spawner" type="Node3D"]
script = ExtResource("1_2otbo")
SceneToSpawn = ExtResource("2_2otbo")
[node name="Marker3D" type="Marker3D" parent="."]

View File

@@ -10,7 +10,6 @@ font_size = 30
[node name="TutoTrigger" type="Area3D"]
collision_layer = 0
collision_mask = 16
script = ExtResource("1_w8mpv")
[node name="Control" type="Control" parent="."]

View File

@@ -0,0 +1,9 @@
namespace Movementtests.systems.damage;
public enum EDamageTypes
{
Normal,
Fire,
Ice,
Explosion,
}

View File

@@ -0,0 +1 @@
uid://dubmiwfuunxmu

View File

@@ -20,19 +20,17 @@ public partial class DashSystem: Node3D
public bool ShouldMantle { get; set; }
public Vector3 PlannedMantleLocation { get; set; }
public MantleSystem MantleSystem { get; set; }
private Node3D _head;
private ShapeCast3D _dashCast3D;
private ShapeCast3D _playerCast3D;
private Camera3D _camera;
private TweenQueueSystem _tweenQueueSystem;
private Vector3 _dashDirection = Vector3.Zero;
private ShapeCast3D _dashCastDrop;
private MeshInstance3D _dashDropIndicator;
private MeshInstance3D _dashDropLocationIndicator;
private MantleSystem _mantleSystem;
private MeshInstance3D _dashTarget;
private CpuParticles3D _dashIndicator;
private AnimationPlayer _dashIndicatorAnim;
@@ -48,13 +46,10 @@ public partial class DashSystem: Node3D
public delegate void DashProgressEventHandler(float progress);
private Vector3 _globalDashPosition = Vector3.Zero;
private float _playerHeight;
private float _playerRadius;
public float DashCastRadius { get; set; }
public void Init(Node3D head, Camera3D camera, TweenQueueSystem tweenQueueSystem)
public void Init(Node3D head, Camera3D camera)
{
_dashCast3D = GetNode<ShapeCast3D>("DashCast3D");
var dashShape = _dashCast3D.GetShape() as SphereShape3D;
@@ -66,17 +61,11 @@ public partial class DashSystem: Node3D
_dashDropLocationIndicator = GetNode<MeshInstance3D>("DashDropLocationIndicator");
_dashDropLocationIndicator.Visible = false;
_playerCast3D = GetNode<ShapeCast3D>("PlayerShapeCast3D");
var playerShape = _playerCast3D.GetShape() as CapsuleShape3D;
_playerHeight = playerShape!.Height;
_playerRadius = playerShape!.Radius;
_head = head;
_camera = camera;
_tweenQueueSystem = tweenQueueSystem;
_mantleSystem = GetNode<MantleSystem>("MantleSystem");
_mantleSystem.Init();
MantleSystem = GetNode<MantleSystem>("MantleSystem");
MantleSystem.Init();
_dashTarget = GetNode<MeshInstance3D>("DashTarget");
_dashTarget.SetVisible(false);
@@ -111,14 +100,15 @@ public partial class DashSystem: Node3D
(HasHit, PlannedLocation, CollisionPoint, CollisionNormal) = ComputeDashLocation();
ShouldMantle = false;
var mantleLocation = Vector3.Zero;
if (HasHit && Mathf.Abs(CollisionNormal.Y) < 0.5f)
{
var mantleResult = _mantleSystem.FindMantleLocationAtPoint(PlannedLocation, CollisionNormal);
ShouldMantle = mantleResult.IsSome(out mantleLocation);
}
PlannedMantleLocation = mantleLocation;
// TODO: Position mantle system to planned location, aligned with ground planned and facing the same way as the dash
// Then query it being careful when dashing underneath a platform and such
MantleSystem.SetGlobalPosition(PlannedLocation);
MantleSystem.SetRotation(new Vector3(
MantleSystem.Rotation.X,
_head.Rotation.Y,
MantleSystem.Rotation.Z));
MantleSystem.ProcessMantle(false);
ShouldMantle = MantleSystem.IsMantlePossible;
// Setup dash target
var targetColor = HasHit ? new Color(1f, 0.2f, 0.2f) : new Color(1f, 1f, 1f);
@@ -126,7 +116,7 @@ public partial class DashSystem: Node3D
var targetMaterial = (StandardMaterial3D) _dashTarget.GetSurfaceOverrideMaterial(0);
targetMaterial.SetAlbedo(targetColor);
_dashTarget.SetVisible(true);
var targetLocation = ShouldMantle ? PlannedMantleLocation : PlannedLocation;
var targetLocation = ShouldMantle ? MantleSystem.FirstMantleProfilePoint : PlannedLocation;
_dashTarget.SetGlobalPosition(targetLocation);
var shouldShowDropIndicator = !HasHit && !ShouldMantle;
@@ -162,6 +152,5 @@ public partial class DashSystem: Node3D
public void StartPreparingDash()
{
_dashTarget.SetVisible(true);
}
}

View File

@@ -1,7 +1,6 @@
[gd_scene load_steps=10 format=3 uid="uid://cqduhd4opgwvm"]
[gd_scene load_steps=9 format=3 uid="uid://cqduhd4opgwvm"]
[ext_resource type="Script" uid="uid://dwoppk8j5fxeg" path="res://systems/dash/DashSystem.cs" id="1_hwig2"]
[ext_resource type="Shape3D" uid="uid://keseacdcooot" path="res://player_controller/resources/PlayerShape.tres" id="2_jngg2"]
[ext_resource type="PackedScene" uid="uid://wq1okogkhc5l" path="res://systems/mantle/mantle_system.tscn" id="2_pff7b"]
[ext_resource type="PackedScene" uid="uid://hd0868f4pb63" path="res://systems/dash/dash_indicator.tscn" id="2_tqt6i"]
@@ -24,19 +23,12 @@ outer_radius = 0.5
script = ExtResource("1_hwig2")
DashIndicatorScene = ExtResource("2_tqt6i")
[node name="PlayerShapeCast3D" type="ShapeCast3D" parent="."]
visible = false
shape = ExtResource("2_jngg2")
target_position = Vector3(0, 0, 0)
collision_mask = 2
debug_shape_custom_color = Color(0.863327, 0.636844, 0, 1)
[node name="DashCast3D" type="ShapeCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
shape = SubResource("SphereShape3D_jngg2")
target_position = Vector3(0, 0, -12)
max_results = 1
collision_mask = 2
collision_mask = 256
debug_shape_custom_color = Color(0.911631, 0.11884, 0.656218, 1)
[node name="DashCastDrop" type="ShapeCast3D" parent="."]
@@ -44,7 +36,7 @@ transform = Transform3D(1, 0, 0, 0, -4.371139e-08, 1, 0, -1, -4.371139e-08, 0, 1
shape = SubResource("SphereShape3D_jngg2")
target_position = Vector3(0, 0, -50)
max_results = 1
collision_mask = 2
collision_mask = 256
debug_shape_custom_color = Color(0.911631, 0.11884, 0.656218, 1)
[node name="DashTarget" type="MeshInstance3D" parent="."]

View File

@@ -22,12 +22,26 @@ public partial class HeadSystem : Node3D
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float GroundedCameraIncline { get; set; } = 5f;
[Export(PropertyHint.Range, "0,2,0.1,or_greater")]
public float SlidingCameraHeightOffset { get; set; } = 1.0f;
[Export(PropertyHint.Range, "0,1,0.01,or_greater")]
public float SlidingJitterFrequency { get; set; } = 0.01f;
[Export(PropertyHint.Range, "0,1,0.01,or_greater")]
public float SlidingJitterAmplitude { get; set; } = 0.1f;
private FastNoiseLite _slidingNoise = new FastNoiseLite();
public void Init()
{
Input.SetMouseMode(Input.MouseModeEnum.Captured);
_camera = GetNode<Camera3D>("CameraSmooth/Camera3D");
_cameraAnchor = GetNode<Marker3D>("CameraAnchor");
_animationPlayer = GetNode<AnimationPlayer>("AnimationPlayer");
_slidingNoise.NoiseType = FastNoiseLite.NoiseTypeEnum.Perlin;
_slidingNoise.SetFrequency(SlidingJitterFrequency);
}
public void OnMantle()
@@ -35,7 +49,7 @@ public partial class HeadSystem : Node3D
_animationPlayer.Play("mantle");
}
public void LookAround(double delta, Vector2 lookDir, Vector3 playerVelocity, Vector3? wallContactPoint = null, float sensitivitMultiplier = 1f)
public void LookAround(double delta, Vector2 lookDir, Vector3 playerInput, Vector3 playerVelocity, Vector3? wallContactPoint = null, float sensitivitMultiplier = 1f, bool isSliding = false)
{
// Horizontal movement of head
float angleForHorizontalRotation = lookDir.X * LookSensitivity * sensitivitMultiplier;
@@ -46,8 +60,9 @@ public partial class HeadSystem : Node3D
currentCameraRotation.X += Convert.ToSingle(lookDir.Y * LookSensitivity * sensitivitMultiplier);
currentCameraRotation.X = Mathf.Clamp(currentCameraRotation.X, Mathf.DegToRad(-90f), Mathf.DegToRad(90f));
// Camera incline on Wall and more
var isWallRunning = wallContactPoint.HasValue && wallContactPoint.Value.Length() > Mathf.Epsilon;
var cameraIncline = 0f;
float cameraIncline;
if (isWallRunning)
{
var directionToWall = (wallContactPoint.Value - GlobalPosition).Normalized();
@@ -56,11 +71,23 @@ public partial class HeadSystem : Node3D
}
else
{
var cameraInclineFactor = ComputeCameraInclineFactor(playerVelocity);
var cameraInclineFactor = ComputeCameraInclineFactor(playerInput);
cameraIncline = Mathf.DegToRad(GroundedCameraIncline * cameraInclineFactor * -1.0f);
}
currentCameraRotation.Z = (float) Mathf.Lerp(currentCameraRotation.Z, cameraIncline, delta * CameraInclineAcceleration);
_cameraAnchor.Rotation = currentCameraRotation;
if (isSliding)
{
_cameraAnchor.Position = Vector3.Down*SlidingCameraHeightOffset;
float noise1D = _slidingNoise.GetNoise1D(Time.GetTicksMsec());
float noiseAmplitude = SlidingJitterAmplitude*Mathf.Clamp(playerVelocity.Length(), 0f, 1f);
_cameraAnchor.Position += Vector3.Up*noise1D*noiseAmplitude;
}
else
{
_cameraAnchor.Position = Vector3.Zero;
}
_camera.GlobalTransform = _cameraAnchor.GetGlobalTransformInterpolated();
}

View File

@@ -69,10 +69,6 @@ transform = Transform3D(1, 0, 0, 0, 0.99999994, 0, 0, 0, 0.99999994, 0, 0, 0)
current = true
fov = 90.0
[node name="RayCast3D" type="RayCast3D" parent="CameraSmooth/Camera3D"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, -0.64723)
visible = false
[node name="CameraAnchor" type="Marker3D" parent="."]
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]

View File

@@ -1,14 +0,0 @@
[gd_resource type="Resource" script_class="GUIDEAction" load_steps=2 format=3 uid="uid://7wm8ywvujwf"]
[ext_resource type="Script" uid="uid://cluhc11vixkf1" path="res://addons/guide/guide_action.gd" id="1_36r6u"]
[resource]
script = ExtResource("1_36r6u")
name = &""
action_value_type = 0
block_lower_priority_actions = true
emit_as_godot_actions = false
is_remappable = false
display_name = ""
display_category = ""
metadata/_custom_type_script = "uid://cluhc11vixkf1"

View File

@@ -1,4 +1,4 @@
[gd_resource type="Resource" script_class="GUIDEMappingContext" load_steps=155 format=3 uid="uid://bl5crtu1gkrtr"]
[gd_resource type="Resource" script_class="GUIDEMappingContext" load_steps=161 format=3 uid="uid://bl5crtu1gkrtr"]
[ext_resource type="Script" uid="uid://cpplm41b5bt6m" path="res://addons/guide/guide_action_mapping.gd" id="1_qmhk6"]
[ext_resource type="Resource" uid="uid://htqvokm8mufq" path="res://systems/inputs/base_mode/move.tres" id="2_g6bbx"]
@@ -18,22 +18,22 @@
[ext_resource type="Script" uid="uid://b52rqq28tuqpg" path="res://addons/guide/triggers/guide_trigger_pressed.gd" id="15_fykw6"]
[ext_resource type="Script" uid="uid://b4cdrn4paoj3i" path="res://addons/guide/triggers/guide_trigger_down.gd" id="15_g6bbx"]
[ext_resource type="Script" uid="uid://cgy4anjdob2tp" path="res://addons/guide/modifiers/guide_modifier_window_relative.gd" id="15_rvpjj"]
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/empower_down.tres" id="16_0qat1"]
[ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://systems/inputs/base_mode/aim_pressed.tres" id="16_li5ak"]
[ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://systems/inputs/base_mode/aim_release.tres" id="16_rvpjj"]
[ext_resource type="Script" uid="uid://vgjlx6p007lp" path="res://addons/guide/inputs/guide_input_mouse_button.gd" id="17_kxb2c"]
[ext_resource type="Script" uid="uid://biiggjw6tv4uq" path="res://addons/guide/triggers/guide_trigger_released.gd" id="17_s8kjn"]
[ext_resource type="Resource" uid="uid://7wm8ywvujwf" path="res://systems/inputs/base_mode/aim_cancel.tres" id="18_vibkn"]
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/empower_release.tres" id="19_li5ak"]
[ext_resource type="Script" uid="uid://rvttn472ix6v" path="res://addons/guide/inputs/guide_input_joy_button.gd" id="19_qkgmj"]
[ext_resource type="Resource" uid="uid://bdit2jy5gbpts" path="res://systems/inputs/base_mode/jump.tres" id="21_818lq"]
[ext_resource type="Resource" uid="uid://b5gx3q8nvu72e" path="res://systems/inputs/base_mode/hit.tres" id="22_2hs2y"]
[ext_resource type="Resource" uid="uid://d2r0ur8k3cuu3" path="res://systems/inputs/base_mode/dash.tres" id="23_g6bbx"]
[ext_resource type="Script" uid="uid://dsa1dnifd6w32" path="res://addons/guide/guide_mapping_context.gd" id="23_llfhp"]
[ext_resource type="Resource" uid="uid://bw5k2gsv3jqcv" path="res://systems/inputs/base_mode/throw.tres" id="24_yp12v"]
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/slide_pressed.tres" id="23_rvpjj"]
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/slide_released.tres" id="25_rvpjj"]
[ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://systems/inputs/base_mode/jump_pressed.tres" id="25_si4d4"]
[ext_resource type="Resource" uid="uid://dgluj0ql5vth7" path="res://systems/inputs/base_mode/pause.tres" id="29_q86qg"]
[ext_resource type="Script" uid="uid://cw71o87tvdx3q" path="res://addons/guide/inputs/guide_input_key.gd" id="30_cvxqo"]
[ext_resource type="Resource" uid="uid://spo3pbqjx0eb" path="res://systems/inputs/base_mode/parry.tres" id="30_rvpjj"]
[ext_resource type="Resource" uid="uid://dxy0071ic1wdj" path="res://systems/inputs/base_mode/slam.tres" id="32_s8kjn"]
[ext_resource type="Resource" uid="uid://s1l0n1iitc6m" path="res://systems/inputs/base_mode/move_back.tres" id="33_fykw6"]
[ext_resource type="Resource" uid="uid://brswsknpgwal2" path="res://systems/inputs/base_mode/move_front.tres" id="34_rvpjj"]
[ext_resource type="Resource" uid="uid://f3vs6l4m623s" path="res://systems/inputs/base_mode/move_left.tres" id="35_s8kjn"]
@@ -229,57 +229,65 @@ action = ExtResource("16_rvpjj")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_bkx7d"), SubResource("Resource_yxj6r")])
metadata/_guide_input_mappings_collapsed = false
[sub_resource type="Resource" id="Resource_fykw6"]
script = ExtResource("10_cvxqo")
axis = 5
[sub_resource type="Resource" id="Resource_rvpjj"]
script = ExtResource("15_fykw6")
[sub_resource type="Resource" id="Resource_s8kjn"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_fykw6")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_rvpjj")])
metadata/_guide_triggers_collapsed = false
[sub_resource type="Resource" id="Resource_vibkn"]
script = ExtResource("1_qmhk6")
action = ExtResource("16_0qat1")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_s8kjn")])
[sub_resource type="Resource" id="Resource_qkgmj"]
script = ExtResource("10_cvxqo")
axis = 5
[sub_resource type="Resource" id="Resource_st2ej"]
script = ExtResource("15_g6bbx")
[sub_resource type="Resource" id="Resource_s8kjn"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_qkgmj")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_st2ej")])
metadata/_guide_triggers_collapsed = false
[sub_resource type="Resource" id="Resource_wcvib"]
script = ExtResource("30_cvxqo")
key = 4194326
[sub_resource type="Resource" id="Resource_8ifoc"]
script = ExtResource("15_g6bbx")
[sub_resource type="Resource" id="Resource_imjft"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_wcvib")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_8ifoc")])
metadata/_guide_triggers_collapsed = false
[sub_resource type="Resource" id="Resource_vibkn"]
script = ExtResource("1_qmhk6")
action = ExtResource("23_rvpjj")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_s8kjn"), SubResource("Resource_imjft")])
[sub_resource type="Resource" id="Resource_f3pn5"]
script = ExtResource("10_cvxqo")
axis = 5
[sub_resource type="Resource" id="Resource_rvpjj"]
script = ExtResource("17_s8kjn")
[sub_resource type="Resource" id="Resource_818lq"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_qkgmj")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_st2ej")])
input = SubResource("Resource_f3pn5")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_rvpjj")])
[sub_resource type="Resource" id="Resource_qksfw"]
script = ExtResource("30_cvxqo")
key = 4194326
[sub_resource type="Resource" id="Resource_bhf7o"]
script = ExtResource("17_s8kjn")
[sub_resource type="Resource" id="Resource_woy8j"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_qksfw")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_bhf7o")])
[sub_resource type="Resource" id="Resource_2hs2y"]
script = ExtResource("1_qmhk6")
action = ExtResource("19_li5ak")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_818lq")])
[sub_resource type="Resource" id="Resource_lfx76"]
script = ExtResource("19_qkgmj")
button = 2
[sub_resource type="Resource" id="Resource_oruo7"]
script = ExtResource("15_fykw6")
[sub_resource type="Resource" id="Resource_4ee3d"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_lfx76")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_oruo7")])
[sub_resource type="Resource" id="Resource_0s4kt"]
script = ExtResource("1_qmhk6")
action = ExtResource("18_vibkn")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_4ee3d")])
action = ExtResource("25_rvpjj")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_818lq"), SubResource("Resource_woy8j")])
[sub_resource type="Resource" id="Resource_1fkas"]
script = ExtResource("19_qkgmj")
@@ -359,6 +367,35 @@ script = ExtResource("1_qmhk6")
action = ExtResource("22_2hs2y")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_500v3"), SubResource("Resource_a8sqk")])
[sub_resource type="Resource" id="Resource_kx31q"]
script = ExtResource("19_qkgmj")
button = 9
[sub_resource type="Resource" id="Resource_oux88"]
script = ExtResource("15_fykw6")
[sub_resource type="Resource" id="Resource_b7w5s"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_kx31q")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_oux88")])
[sub_resource type="Resource" id="Resource_jk2g8"]
script = ExtResource("30_cvxqo")
key = 70
[sub_resource type="Resource" id="Resource_y7p41"]
script = ExtResource("15_fykw6")
[sub_resource type="Resource" id="Resource_3uxou"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_jk2g8")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_y7p41")])
[sub_resource type="Resource" id="Resource_3frwi"]
script = ExtResource("1_qmhk6")
action = ExtResource("30_rvpjj")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_b7w5s"), SubResource("Resource_3uxou")])
[sub_resource type="Resource" id="Resource_g6bbx"]
script = ExtResource("19_qkgmj")
button = 1
@@ -383,52 +420,40 @@ script = ExtResource("3_yp12v")
input = SubResource("Resource_xbeov")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_rt8uw")])
[sub_resource type="Resource" id="Resource_jk2g8"]
script = ExtResource("30_cvxqo")
key = 70
[sub_resource type="Resource" id="Resource_wcvib"]
script = ExtResource("15_fykw6")
[sub_resource type="Resource" id="Resource_imjft"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_jk2g8")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_wcvib")])
[sub_resource type="Resource" id="Resource_kx31q"]
script = ExtResource("30_cvxqo")
key = 4194326
[sub_resource type="Resource" id="Resource_oux88"]
script = ExtResource("15_fykw6")
[sub_resource type="Resource" id="Resource_b7w5s"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_kx31q")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_oux88")])
[sub_resource type="Resource" id="Resource_0qat1"]
script = ExtResource("1_qmhk6")
action = ExtResource("23_g6bbx")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_1rw8g"), SubResource("Resource_hj46p"), SubResource("Resource_imjft"), SubResource("Resource_b7w5s")])
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_1rw8g"), SubResource("Resource_hj46p")])
metadata/_guide_input_mappings_collapsed = false
[sub_resource type="Resource" id="Resource_j3axn"]
[sub_resource type="Resource" id="Resource_o5yys"]
script = ExtResource("19_qkgmj")
button = 3
button = 2
[sub_resource type="Resource" id="Resource_kxb2c"]
script = ExtResource("15_fykw6")
[sub_resource type="Resource" id="Resource_06f1o"]
script = ExtResource("15_g6bbx")
[sub_resource type="Resource" id="Resource_v2ywt"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_j3axn")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_kxb2c")])
input = SubResource("Resource_o5yys")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_06f1o")])
[sub_resource type="Resource" id="Resource_qpgnj"]
script = ExtResource("30_cvxqo")
key = 69
[sub_resource type="Resource" id="Resource_g5tel"]
script = ExtResource("15_g6bbx")
[sub_resource type="Resource" id="Resource_s6d3g"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_qpgnj")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_g5tel")])
[sub_resource type="Resource" id="Resource_vtk18"]
script = ExtResource("1_qmhk6")
action = ExtResource("24_yp12v")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_v2ywt")])
action = ExtResource("32_s8kjn")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_v2ywt"), SubResource("Resource_s6d3g")])
[sub_resource type="Resource" id="Resource_s4bc4"]
script = ExtResource("30_cvxqo")
@@ -526,5 +551,5 @@ input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_7io5e")])
[resource]
script = ExtResource("23_llfhp")
mappings = Array[ExtResource("1_qmhk6")]([SubResource("Resource_88x08"), SubResource("Resource_tgr2g"), SubResource("Resource_iarn8"), SubResource("Resource_cvxqo"), SubResource("Resource_tb8ii"), SubResource("Resource_iihs4"), SubResource("Resource_vibkn"), SubResource("Resource_2hs2y"), SubResource("Resource_0s4kt"), SubResource("Resource_d2r0d"), SubResource("Resource_xt1x5"), SubResource("Resource_ew1hw"), SubResource("Resource_0qat1"), SubResource("Resource_vtk18"), SubResource("Resource_weyro"), SubResource("Resource_fjku4"), SubResource("Resource_odnhd"), SubResource("Resource_0eff7"), SubResource("Resource_gt77e")])
mappings = Array[ExtResource("1_qmhk6")]([SubResource("Resource_88x08"), SubResource("Resource_tgr2g"), SubResource("Resource_iarn8"), SubResource("Resource_cvxqo"), SubResource("Resource_tb8ii"), SubResource("Resource_iihs4"), SubResource("Resource_vibkn"), SubResource("Resource_2hs2y"), SubResource("Resource_d2r0d"), SubResource("Resource_xt1x5"), SubResource("Resource_ew1hw"), SubResource("Resource_3frwi"), SubResource("Resource_0qat1"), SubResource("Resource_vtk18"), SubResource("Resource_weyro"), SubResource("Resource_fjku4"), SubResource("Resource_odnhd"), SubResource("Resource_0eff7"), SubResource("Resource_gt77e")])
metadata/_custom_type_script = "uid://dsa1dnifd6w32"

View File

@@ -0,0 +1,7 @@
[gd_resource type="Resource" script_class="GUIDEAction" load_steps=2 format=3 uid="uid://spo3pbqjx0eb"]
[ext_resource type="Script" uid="uid://cluhc11vixkf1" path="res://addons/guide/guide_action.gd" id="1_hlutc"]
[resource]
script = ExtResource("1_hlutc")
metadata/_custom_type_script = "uid://cluhc11vixkf1"

View File

@@ -0,0 +1,7 @@
[gd_resource type="Resource" script_class="GUIDEAction" load_steps=2 format=3 uid="uid://dxy0071ic1wdj"]
[ext_resource type="Script" uid="uid://cluhc11vixkf1" path="res://addons/guide/guide_action.gd" id="1_6evmc"]
[resource]
script = ExtResource("1_6evmc")
metadata/_custom_type_script = "uid://cluhc11vixkf1"

View File

@@ -1,14 +0,0 @@
[gd_resource type="Resource" script_class="GUIDEAction" load_steps=2 format=3 uid="uid://bw5k2gsv3jqcv"]
[ext_resource type="Script" uid="uid://cluhc11vixkf1" path="res://addons/guide/guide_action.gd" id="1_7f0q6"]
[resource]
script = ExtResource("1_7f0q6")
name = &""
action_value_type = 0
block_lower_priority_actions = true
emit_as_godot_actions = false
is_remappable = false
display_name = ""
display_category = ""
metadata/_custom_type_script = "uid://cluhc11vixkf1"

View File

@@ -10,7 +10,7 @@ class_name InputController
@export var move_right:GUIDEAction
@export var move_front:GUIDEAction
@export var move_back:GUIDEAction
@export var rotate_y:GUIDEAction
@export var rotate_vertical:GUIDEAction
@export var rotate_floorplane:GUIDEAction
@export_group("Trigger actions")
@@ -21,13 +21,14 @@ class_name InputController
@export_subgroup("Jump")
@export var jump:GUIDEAction
@export var jump_pressed:GUIDEAction
@export_subgroup("Slide")
@export var slide_pressed:GUIDEAction
@export var slide_released:GUIDEAction
@export_subgroup("Other")
@export var empower_down:GUIDEAction
@export var empower_released:GUIDEAction
@export var aim_canceled:GUIDEAction
@export var hit:GUIDEAction
@export var parry:GUIDEAction
@export var dash:GUIDEAction
@export var throw:GUIDEAction
@export var slam:GUIDEAction
signal input_device_changed(is_gamepad: bool)
var _using_gamepad = false
@@ -46,13 +47,13 @@ signal input_aim_pressed
signal input_aim_down
signal input_aim_released
signal input_empower_down
signal input_empower_released
signal input_aim_canceled
signal input_slide_started
signal input_slide_ended
signal input_hit
signal input_parry
signal input_dash
signal input_throw
signal input_slam
func _ready() -> void:
GUIDE.enable_mapping_context(base_mode)
@@ -60,53 +61,47 @@ func _ready() -> void:
aim_down.triggered.connect(on_input_aim_down)
aim_pressed.triggered.connect(on_input_aim_pressed)
aim_released.triggered.connect(on_input_aim_released)
empower_down.triggered.connect(on_input_empower_down)
empower_released.triggered.connect(on_input_empower_released)
aim_canceled.triggered.connect(on_input_aim_canceled)
jump_pressed.triggered.connect(on_input_jump_started)
jump.triggered.connect(on_input_jump_ongoing)
jump.completed.connect(on_input_jump_ended)
hit.triggered.connect(on_input_hit)
dash.triggered.connect(on_input_dash)
throw.triggered.connect(on_input_throw)
func on_input_dash():
input_dash.emit()
slide_pressed.triggered.connect(on_input_slide_started)
slide_released.triggered.connect(on_input_slide_ended)
func on_input_throw():
input_throw.emit()
hit.triggered.connect(on_input_hit)
parry.triggered.connect(on_input_parry)
dash.triggered.connect(on_input_dash)
slam.triggered.connect(on_input_slam)
func on_input_hit():
input_hit.emit()
func on_input_parry():
input_parry.emit()
func on_input_dash():
input_dash.emit()
func on_input_slam():
input_slam.emit()
func on_input_jump_started():
input_jump_started.emit()
func on_input_jump_ongoing():
input_jump_ongoing.emit()
func on_input_jump_ended():
input_jump_ended.emit()
func on_input_aim_down():
input_aim_down.emit()
func on_input_aim_pressed():
input_aim_pressed.emit()
func on_input_aim_released():
input_aim_released.emit()
func on_input_empower_down():
input_empower_down.emit()
func on_input_empower_released():
input_empower_released.emit()
func on_input_aim_canceled():
input_aim_canceled.emit()
func on_input_slide_started():
input_slide_started.emit()
func on_input_slide_ended():
input_slide_ended.emit()
func _input(event: InputEvent) -> void:
if event is InputEventKey:
@@ -130,5 +125,5 @@ func _process(_delta: float) -> void:
input_move_keyboard.emit(keyboard_input_vector)
input_move.emit(move.value_axis_3d)
input_rotate_y.emit(rotate_y.value_axis_1d)
input_rotate_y.emit(rotate_vertical.value_axis_1d)
input_rotate_floorplane.emit(rotate_floorplane.value_axis_1d)

View File

@@ -14,47 +14,100 @@ public partial class MantleSystem: Node3D
private ShapeCast3D _wallInFrontCast3D;
private ShapeCast3D _mantleCast3D;
private RayCast3D _mantleCheckCast3D;
private ShapeCast3D _inAirWallDetect;
private ShapeCast3D _groundedWallDetect;
public Curve3D MantleCurve { get; private set; }
public Vector3 FirstMantleProfilePoint { get; private set; } = Vector3.Zero;
public bool IsMantlePossible { get; private set; } = false;
public bool EndedOnOtherSideOfWall { get; private set; } = false;
public bool FoundGround { get; private set; } = false;
public const int WallProfileCastCount = 7;
private ShapeCast3D[] _wallProfileShapecasts = new ShapeCast3D[WallProfileCastCount];
public void Init()
{
_wallInFrontCast3D = GetNode<ShapeCast3D>("WallInFrontCast3D");
_mantleCast3D = GetNode<ShapeCast3D>("MantleCast3D");
_inAirWallDetect = GetNode<ShapeCast3D>("InAirWallDetect");
_groundedWallDetect = GetNode<ShapeCast3D>("GroundedWallDetect");
for (int i = 0; i < _wallProfileShapecasts.Length; i++)
{
_wallProfileShapecasts[i] = GetNode<ShapeCast3D>($"WallProfileShapeCasts/ShapeCast{i + 1}");
}
}
public Option<Vector3> FindMantleForHeadRotation(float rotation)
private void SetCastsEnabled(bool enabled)
{
_wallInFrontCast3D.SetRotation(new Vector3(
_wallInFrontCast3D.Rotation.X,
rotation,
_wallInFrontCast3D.Rotation.Z));
if (!_wallInFrontCast3D.IsColliding())
foreach (var wallProfileShapecast in _wallProfileShapecasts)
{
return Option<Vector3>.None;
wallProfileShapecast.SetEnabled(enabled);
}
if (_wallInFrontCast3D.GetCollisionNormal(0).Y > 0.8f)
{
GD.Print(_wallInFrontCast3D.GetCollisionNormal(0).Y);
return Option<Vector3>.None;
}
var collisionPoint = _wallInFrontCast3D.GetCollisionPoint(0);
var collisionNormal = _wallInFrontCast3D.GetCollisionNormal(0);
return FindMantleLocationAtPoint(collisionPoint, collisionNormal);
}
public Option<Vector3> FindMantleLocationAtPoint(Vector3 point, Vector3 wallNormal)
public void ProcessMantle(bool isGrounded)
{
var horizontalEndLocation = point - wallNormal * MantleEndLocationDistanceFromWall;
var shapeCastStartLocation = horizontalEndLocation + Vector3.Up * MantleHeightCastStart;
_inAirWallDetect.SetEnabled(!isGrounded);
_groundedWallDetect.SetEnabled(isGrounded);
var isColliding = _inAirWallDetect.IsColliding() || _groundedWallDetect.IsColliding();
SetCastsEnabled(isColliding);
_mantleCast3D.SetGlobalPosition(shapeCastStartLocation);
var targetLocation = Vector3.Down * MantleHeightCastStart + Vector3.Up * MaxStepHeight;
_mantleCast3D.SetTargetPosition(targetLocation);
// Reset state
IsMantlePossible = false;
EndedOnOtherSideOfWall = false;
FoundGround = false;
if (!isColliding) return;
if (_mantleCast3D.IsColliding() && _mantleCast3D.GetCollisionNormal(0).Y >= 0.1f)
return Option.Some(_mantleCast3D.GetCollisionPoint(0));
return Option<Vector3>.None;
// Check if face something wall-like that should be climbable
var collisionNormal = isGrounded ? _groundedWallDetect.GetCollisionNormal(0) : _inAirWallDetect.GetCollisionNormal(0);
if (collisionNormal.Y > 0.7f) return;
var spaceState = GetWorld3D().DirectSpaceState;
MantleCurve = new Curve3D();
MantleCurve.AddPoint(Vector3.Zero);
var hasFirstProfileHit = false;
var previousProfilePoint = GlobalPosition;
foreach (var wallProfileShapecast in _wallProfileShapecasts)
{
// Haven't met the wall yet
if (!wallProfileShapecast.IsColliding() && !hasFirstProfileHit) continue;
var globalTargetPosition = wallProfileShapecast.GlobalPosition + wallProfileShapecast.TargetPosition;
// Got to the other side of the wall, we stop there
if (!wallProfileShapecast.IsColliding())
{
break;
}
var profilePoint = wallProfileShapecast.GetCollisionPoint(0);
var profileNormal = wallProfileShapecast.GetCollisionNormal(0);
var shape = wallProfileShapecast.Shape as SphereShape3D;
var shapeRadius = shape == null ? 0.125f : shape.Radius;
var centerOfShape = profilePoint + profileNormal * shapeRadius;
// Check if we collided parallel to a wall
var isCollisionSameAsTarget = globalTargetPosition.IsEqualApprox(centerOfShape);
var isCollidingWithWall = profileNormal.Y < 0.1f;
if (isCollisionSameAsTarget || isCollidingWithWall) continue;
// Check if the path from the previous point makes us go through a wall
var query = PhysicsRayQueryParameters3D.Create(previousProfilePoint, centerOfShape, wallProfileShapecast.CollisionMask);
var result = spaceState.IntersectRay(query);
if (result.Count > 0) break; // We are going through a wall, we stop there
// We have a valid collision
if (!hasFirstProfileHit) FirstMantleProfilePoint = centerOfShape;
hasFirstProfileHit = true;
previousProfilePoint = centerOfShape;
MantleCurve.AddPoint(ToLocal(centerOfShape));
}
if (MantleCurve.PointCount == 1) return;
IsMantlePossible = true;
}
}

View File

@@ -0,0 +1,4 @@
[gd_resource type="SphereShape3D" format=3 uid="uid://dp2p8v7demb5j"]
[resource]
radius = 0.25

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=4 format=3 uid="uid://wq1okogkhc5l"]
[gd_scene load_steps=7 format=3 uid="uid://wq1okogkhc5l"]
[ext_resource type="Script" uid="uid://bja6tis1vaysu" path="res://systems/mantle/MantleSystem.cs" id="1_2oobp"]
@@ -8,22 +8,97 @@ height = 1.7
[sub_resource type="SphereShape3D" id="SphereShape3D_2oobp"]
radius = 0.75
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_2oobp"]
radius = 0.25
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_i32qj"]
radius = 0.25
height = 1.5
[sub_resource type="SphereShape3D" id="SphereShape3D_i32qj"]
radius = 0.125
[node name="MantleSystem" type="Node3D"]
script = ExtResource("1_2oobp")
MantleEndLocationDistanceFromWall = 0.2
MantleHeightCastStart = 3.0
[node name="MantleCast3D" type="ShapeCast3D" parent="."]
visible = false
shape = SubResource("CapsuleShape3D_4coqe")
target_position = Vector3(0, 0, 0)
max_results = 1
collision_mask = 2
collision_mask = 256
debug_shape_custom_color = Color(1, 0, 0, 1)
[node name="WallInFrontCast3D" type="ShapeCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
visible = false
shape = SubResource("SphereShape3D_2oobp")
target_position = Vector3(0, 0, -1.5)
max_results = 1
collision_mask = 2
collision_mask = 256
debug_shape_custom_color = Color(0.911631, 0.11884, 0.656218, 1)
[node name="InAirWallDetect" type="ShapeCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.01, 0)
shape = SubResource("CapsuleShape3D_2oobp")
target_position = Vector3(0, 0, -2)
collision_mask = 256
[node name="GroundedWallDetect" type="ShapeCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.26, 0)
shape = SubResource("CapsuleShape3D_i32qj")
target_position = Vector3(0, 0, -2)
collision_mask = 256
[node name="WallProfileShapeCasts" type="Node3D" parent="."]
[node name="ShapeCast1" type="ShapeCast3D" parent="WallProfileShapeCasts"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -0.5)
enabled = false
shape = SubResource("SphereShape3D_i32qj")
target_position = Vector3(0, -2.125, 0)
collision_mask = 256
[node name="ShapeCast2" type="ShapeCast3D" parent="WallProfileShapeCasts"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -0.75)
enabled = false
shape = SubResource("SphereShape3D_i32qj")
target_position = Vector3(0, -2.125, 0)
collision_mask = 256
[node name="ShapeCast3" type="ShapeCast3D" parent="WallProfileShapeCasts"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1)
enabled = false
shape = SubResource("SphereShape3D_i32qj")
target_position = Vector3(0, -2.125, 0)
collision_mask = 256
[node name="ShapeCast4" type="ShapeCast3D" parent="WallProfileShapeCasts"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1.25)
enabled = false
shape = SubResource("SphereShape3D_i32qj")
target_position = Vector3(0, -2.125, 0)
collision_mask = 256
[node name="ShapeCast5" type="ShapeCast3D" parent="WallProfileShapeCasts"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1.5)
enabled = false
shape = SubResource("SphereShape3D_i32qj")
target_position = Vector3(0, -2.125, 0)
collision_mask = 256
[node name="ShapeCast6" type="ShapeCast3D" parent="WallProfileShapeCasts"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -1.75)
enabled = false
shape = SubResource("SphereShape3D_i32qj")
target_position = Vector3(0, -2.125, 0)
collision_mask = 256
[node name="ShapeCast7" type="ShapeCast3D" parent="WallProfileShapeCasts"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, -2)
enabled = false
shape = SubResource("SphereShape3D_i32qj")
target_position = Vector3(0, -2.125, 0)
collision_mask = 256

Some files were not shown because too many files have changed in this diff Show More