Fixed gibs braking shooting collisions.
This commit is contained in:
parent
0426c10ca3
commit
61ed17235b
2 changed files with 27 additions and 25 deletions
|
@ -10,39 +10,39 @@ operator = 2
|
|||
default_input_values = [ 0, 0.0, 1, 0.5 ]
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorOp" id=13]
|
||||
[sub_resource type="VisualShaderNodeVectorOp" id=4]
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeScalarConstant" id=14]
|
||||
[sub_resource type="VisualShaderNodeScalarConstant" id=5]
|
||||
constant = 8.0
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorScalarMix" id=15]
|
||||
[sub_resource type="VisualShaderNodeVectorScalarMix" id=6]
|
||||
|
||||
[sub_resource type="VisualShaderNodeFresnel" id=4]
|
||||
[sub_resource type="VisualShaderNodeFresnel" id=7]
|
||||
default_input_values = [ 2, true, 3, 0.5 ]
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorConstant" id=5]
|
||||
[sub_resource type="VisualShaderNodeColorConstant" id=8]
|
||||
output_port_for_preview = 0
|
||||
constant = Color( 1, 0.859069, 0.215686, 1 )
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorOp" id=6]
|
||||
[sub_resource type="VisualShaderNodeVectorOp" id=9]
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeScalarConstant" id=7]
|
||||
[sub_resource type="VisualShaderNodeScalarConstant" id=10]
|
||||
constant = 2.0
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id=8]
|
||||
[sub_resource type="VisualShaderNodeInput" id=11]
|
||||
output_port_for_preview = 0
|
||||
input_name = "color"
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorConstant" id=9]
|
||||
[sub_resource type="VisualShaderNodeColorConstant" id=12]
|
||||
output_port_for_preview = 0
|
||||
constant = Color( 0.650391, 0.192161, 0.0203247, 1 )
|
||||
|
||||
[sub_resource type="VisualShaderNodeScalarFunc" id=11]
|
||||
[sub_resource type="VisualShaderNodeScalarFunc" id=13]
|
||||
function = 18
|
||||
|
||||
[sub_resource type="VisualShader" id=12]
|
||||
[sub_resource type="VisualShader" id=14]
|
||||
code = "shader_type spatial;
|
||||
render_mode specular_disabled, unshaded;
|
||||
|
||||
|
@ -115,19 +115,19 @@ graph_offset = Vector2( -221, -337.75 )
|
|||
modes/specular = 4
|
||||
flags/unshaded = true
|
||||
nodes/fragment/0/position = Vector2( 560, -300 )
|
||||
nodes/fragment/2/node = SubResource( 4 )
|
||||
nodes/fragment/2/node = SubResource( 7 )
|
||||
nodes/fragment/2/position = Vector2( -640, -540 )
|
||||
nodes/fragment/3/node = SubResource( 5 )
|
||||
nodes/fragment/3/node = SubResource( 8 )
|
||||
nodes/fragment/3/position = Vector2( -680, 260 )
|
||||
nodes/fragment/4/node = SubResource( 6 )
|
||||
nodes/fragment/4/node = SubResource( 9 )
|
||||
nodes/fragment/4/position = Vector2( 260, 60 )
|
||||
nodes/fragment/5/node = SubResource( 7 )
|
||||
nodes/fragment/5/node = SubResource( 10 )
|
||||
nodes/fragment/5/position = Vector2( 40, 260 )
|
||||
nodes/fragment/6/node = SubResource( 8 )
|
||||
nodes/fragment/6/node = SubResource( 11 )
|
||||
nodes/fragment/6/position = Vector2( -640, -220 )
|
||||
nodes/fragment/7/node = SubResource( 9 )
|
||||
nodes/fragment/7/node = SubResource( 12 )
|
||||
nodes/fragment/7/position = Vector2( -400, 40 )
|
||||
nodes/fragment/9/node = SubResource( 11 )
|
||||
nodes/fragment/9/node = SubResource( 13 )
|
||||
nodes/fragment/9/position = Vector2( -80, -180 )
|
||||
nodes/fragment/10/node = SubResource( 1 )
|
||||
nodes/fragment/10/position = Vector2( -400, -160 )
|
||||
|
@ -135,13 +135,13 @@ nodes/fragment/11/node = SubResource( 2 )
|
|||
nodes/fragment/11/position = Vector2( 100, -340 )
|
||||
nodes/fragment/12/node = SubResource( 3 )
|
||||
nodes/fragment/12/position = Vector2( -260, -520 )
|
||||
nodes/fragment/13/node = SubResource( 13 )
|
||||
nodes/fragment/13/node = SubResource( 4 )
|
||||
nodes/fragment/13/position = Vector2( -380, 300 )
|
||||
nodes/fragment/14/node = SubResource( 14 )
|
||||
nodes/fragment/14/node = SubResource( 5 )
|
||||
nodes/fragment/14/position = Vector2( -520, 460 )
|
||||
nodes/fragment/15/node = SubResource( 15 )
|
||||
nodes/fragment/15/node = SubResource( 6 )
|
||||
nodes/fragment/15/position = Vector2( 40, 60 )
|
||||
nodes/fragment/connections = PoolIntArray( 5, 0, 4, 1, 6, 0, 10, 0, 10, 0, 9, 0, 6, 0, 11, 1, 2, 0, 12, 0, 12, 0, 11, 0, 11, 0, 0, 1, 4, 0, 0, 0, 3, 0, 13, 0, 14, 0, 13, 1, 7, 0, 15, 0, 13, 0, 15, 1, 9, 0, 15, 2, 15, 0, 4, 0 )
|
||||
|
||||
[resource]
|
||||
shader = SubResource( 12 )
|
||||
shader = SubResource( 14 )
|
||||
|
|
|
@ -163,8 +163,10 @@ master func kill():
|
|||
get_tree().root.add_child(gibs)
|
||||
gibs.global_transform = global_transform
|
||||
gibs.show()
|
||||
|
||||
# enable the ragdoll colliders
|
||||
for i in gibs.get_children():
|
||||
i.sleeping = false
|
||||
i.get_child(1).disabled = false
|
||||
|
||||
$MeshInstance.hide()
|
||||
yield(get_tree().create_timer(3), "timeout")
|
||||
|
@ -249,9 +251,9 @@ func _input(event):
|
|||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
|
||||
# disabled the ragdoll collider
|
||||
for i in $Player/Gibs.get_children():
|
||||
print(i)
|
||||
i.get_child(1).disabled = true
|
||||
#disabled = true
|
||||
#$"Player/Gibs/PlayerGibs _cell /shape0".set_disabled(true)
|
||||
|
||||
|
|
Reference in a new issue