Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: a rough standin ragdoll #7

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ mono_crash.*.json
# Suggested by Hugh
.DS_Store

# Art Backup Files
*/*.blend1

# FMOD
addons/FMOD/editor/cache/
!addons/FMOD/editor/resources/
Expand Down
Empty file added _artSource/.gdignore
Empty file.
Binary file added _artSource/BouncyCastleEnv.blend
Binary file not shown.
Binary file added _artSource/ClownMob.blend
Binary file not shown.
Binary file added assets/bouncy_castle/Block-2x2x2.glb
Binary file not shown.
32 changes: 32 additions & 0 deletions assets/bouncy_castle/Block-2x2x2.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b1cprtrct5vn3"
path="res://.godot/imported/Block-2x2x2.glb-52af69f75686f8cd5ab8a85fd964af87.scn"

[deps]

source_file="res://assets/bouncy_castle/Block-2x2x2.glb"
dest_files=["res://.godot/imported/Block-2x2x2.glb-52af69f75686f8cd5ab8a85fd964af87.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1
Binary file added assets/bouncy_castle/Block-4x2x2.glb
Binary file not shown.
32 changes: 32 additions & 0 deletions assets/bouncy_castle/Block-4x2x2.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cn65clyljqfjh"
path="res://.godot/imported/Block-4x2x2.glb-d9a150f82eca4c3598e66eb368ba26e7.scn"

[deps]

source_file="res://assets/bouncy_castle/Block-4x2x2.glb"
dest_files=["res://.godot/imported/Block-4x2x2.glb-d9a150f82eca4c3598e66eb368ba26e7.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1
Binary file added assets/bouncy_castle/Block-4x4x2.glb
Binary file not shown.
32 changes: 32 additions & 0 deletions assets/bouncy_castle/Block-4x4x2.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://80odkksed74y"
path="res://.godot/imported/Block-4x4x2.glb-604d13881b939e401fbf5f6cd19e18e1.scn"

[deps]

source_file="res://assets/bouncy_castle/Block-4x4x2.glb"
dest_files=["res://.godot/imported/Block-4x4x2.glb-604d13881b939e401fbf5f6cd19e18e1.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1
Binary file added assets/bouncy_castle/Block-4x4x4.glb
Binary file not shown.
32 changes: 32 additions & 0 deletions assets/bouncy_castle/Block-4x4x4.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://xk3rhrhwf6ev"
path="res://.godot/imported/Block-4x4x4.glb-6658c8ff74fa56e5079178da1a7111e9.scn"

[deps]

source_file="res://assets/bouncy_castle/Block-4x4x4.glb"
dest_files=["res://.godot/imported/Block-4x4x4.glb-6658c8ff74fa56e5079178da1a7111e9.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1
Binary file added assets/bouncy_castle/Block-8x2x2.glb
Binary file not shown.
32 changes: 32 additions & 0 deletions assets/bouncy_castle/Block-8x2x2.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bdq2quvsjojk6"
path="res://.godot/imported/Block-8x2x2.glb-f1b9014fa126a70d15bcf1c238c7421b.scn"

[deps]

source_file="res://assets/bouncy_castle/Block-8x2x2.glb"
dest_files=["res://.godot/imported/Block-8x2x2.glb-f1b9014fa126a70d15bcf1c238c7421b.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1
Binary file added assets/bouncy_castle/Block-8x4x2.glb
Binary file not shown.
32 changes: 32 additions & 0 deletions assets/bouncy_castle/Block-8x4x2.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bysmmv8ki0sdr"
path="res://.godot/imported/Block-8x4x2.glb-77d910af8141dd22ab0eb2ffcc31445a.scn"

[deps]

source_file="res://assets/bouncy_castle/Block-8x4x2.glb"
dest_files=["res://.godot/imported/Block-8x4x2.glb-77d910af8141dd22ab0eb2ffcc31445a.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1
Binary file added assets/bouncy_castle/Block-8x4x4.glb
Binary file not shown.
32 changes: 32 additions & 0 deletions assets/bouncy_castle/Block-8x4x4.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b3r0ftvvyr7gu"
path="res://.godot/imported/Block-8x4x4.glb-212be05742e9e99923202bf751abab67.scn"

[deps]

source_file="res://assets/bouncy_castle/Block-8x4x4.glb"
dest_files=["res://.godot/imported/Block-8x4x4.glb-212be05742e9e99923202bf751abab67.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1
Binary file added assets/bouncy_castle/Block-8x8x2.glb
Binary file not shown.
32 changes: 32 additions & 0 deletions assets/bouncy_castle/Block-8x8x2.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://lqceyap2pcke"
path="res://.godot/imported/Block-8x8x2.glb-573f663f875e7d5a0f9a3058c9349644.scn"

[deps]

source_file="res://assets/bouncy_castle/Block-8x8x2.glb"
dest_files=["res://.godot/imported/Block-8x8x2.glb-573f663f875e7d5a0f9a3058c9349644.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1
Binary file added assets/bouncy_castle/Block-8x8x4.glb
Binary file not shown.
32 changes: 32 additions & 0 deletions assets/bouncy_castle/Block-8x8x4.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://gujju7c0csvu"
path="res://.godot/imported/Block-8x8x4.glb-2427e5c61daca5c7945035e6af4250ac.scn"

[deps]

source_file="res://assets/bouncy_castle/Block-8x8x4.glb"
dest_files=["res://.godot/imported/Block-8x8x4.glb-2427e5c61daca5c7945035e6af4250ac.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1
Binary file added assets/bouncy_castle/Block-8x8x8.glb
Binary file not shown.
32 changes: 32 additions & 0 deletions assets/bouncy_castle/Block-8x8x8.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://744toe1fqhs8"
path="res://.godot/imported/Block-8x8x8.glb-ca4e185d762fccb93f7fb78629ace737.scn"

[deps]

source_file="res://assets/bouncy_castle/Block-8x8x8.glb"
dest_files=["res://.godot/imported/Block-8x8x8.glb-ca4e185d762fccb93f7fb78629ace737.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1
Binary file added assets/mobs/ClownMob.glb
Binary file not shown.
32 changes: 32 additions & 0 deletions assets/mobs/ClownMob.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cldr3hbj5kyve"
path="res://.godot/imported/ClownMob.glb-ee50b5ee9760c211840b9626e60e0416.scn"

[deps]

source_file="res://assets/mobs/ClownMob.glb"
dest_files=["res://.godot/imported/ClownMob.glb-ee50b5ee9760c211840b9626e60e0416.scn"]

[params]

nodes/root_type="StaticBody3D"
nodes/root_name="StandinMob"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1
8 changes: 6 additions & 2 deletions scenes/Player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func _physics_process(delta):
weapon.show()
reload = 0
var col = raycast.get_collider()
if raycast.is_colliding() and col is Actor:
if raycast.is_colliding() and (col is Actor or col.has_method("kill")):
if col.hitbox:
if punch_range.overlaps_area(col.hitbox):
var pos_raised = Vector3(
Expand All @@ -76,9 +76,13 @@ func _physics_process(delta):
)
var to = raycast.to_global(pos_raised)
var dir = global_transform.origin.direction_to(to)
col.apply_impulse(dir.normalized()*20)
if col.has_method("ragdoll_impulse"):
col.ragdoll_impulse(dir.normalized()*20)
else:
col.apply_impulse(dir.normalized()*20)
#print("PUSH", raycast.target_position, pos_raised, to, dir, dir.normalized()*10)
col.hit = true

FMODRuntime.play_one_shot(hit_sfx)
#rotation_degrees.x += 4.0 # gun recoil
if weapon_tween:
Expand Down
Loading