Merge branch 'master' of https://gitlab.hexaquo.at/ggjg20/bodypartfighter
This commit is contained in:
commit
2ededa4069
14 files changed
+84
-8
No files matched your search
@@ -0,0 +1,25 @@
|
||||
extends PushingBodyPart
|
||||
|
||||
|
||||
onready var anim = get_node("Mesh/AnimationPlayer")
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func action():
|
||||
anim.play("ArmatureAction")
|
||||
|
||||
|
||||
func push(body):
|
||||
# We multiply by 0.1 because we only want it to spin slightly, it should mostly go up
|
||||
var offset = transform.basis.xform(Vector3.ZERO)
|
||||
var direction = (base.transform.basis.y - base.transform.basis.z).normalized() * 5.0
|
||||
|
||||
base.apply_impulse(offset, direction)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta: float) -> void:
|
||||
# pass
|
||||
@@ -0,0 +1,48 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://BodyParts/PushingBodyPart.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://BodyParts/HumanLeg.gd" type="Script" id=2]
|
||||
[ext_resource path="res://3D Input/Fertige GLBs/Bein_Mensch.glb" type="PackedScene" id=3]
|
||||
[ext_resource path="res://3D Input/beinimage.png" type="Texture" id=4]
|
||||
|
||||
[sub_resource type="BoxShape" id=2]
|
||||
extents = Vector3( 0.312908, 1.16904, 0.82381 )
|
||||
|
||||
[sub_resource type="SphereShape" id=3]
|
||||
radius = 0.108468
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=1]
|
||||
albedo_texture = ExtResource( 4 )
|
||||
|
||||
[node name="HumanLeg" instance=ExtResource( 1 )]
|
||||
transform = Transform( 1, 8.74228e-08, -3.82137e-15, 0, -4.37114e-08, -1, -8.74228e-08, 1, -4.37114e-08, 0, 0, 0 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="PartCollider" parent="." index="0"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.77838, 0.0523456 )
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="TouchArea" parent="." index="1"]
|
||||
transform = Transform( 1.97878, 4.49418e-13, -2.27374e-13, -6.82121e-13, -0.277472, -1.95923, 7.89663e-14, 1.95923, -0.277471, -6.25278e-13, -2.74829, -0.692869 )
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"]
|
||||
shape = SubResource( 3 )
|
||||
|
||||
[node name="Mesh" parent="." index="2" instance=ExtResource( 3 )]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.42109e-14, -2.28512, -0.0490953 )
|
||||
|
||||
[node name="Skeleton" parent="Mesh/Armature" index="0"]
|
||||
bones/2/bound_children = [ NodePath("BoneAttachment") ]
|
||||
|
||||
[node name="Cube" parent="Mesh/Armature/Skeleton" index="0"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, -3.72529e-09, 0, 3.72529e-09, 1, 0, 0, 0 )
|
||||
material/0 = SubResource( 1 )
|
||||
|
||||
[node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"]
|
||||
transform = Transform( 1, 2.27374e-13, -1.13687e-13, 3.41061e-13, 0.0910855, 0.995843, -5.68434e-14, -0.995843, 0.0910852, -3.3393e-13, 1.43368, 0.260799 )
|
||||
bone_name = "bone_2"
|
||||
|
||||
[node name="RemoteTransform" type="RemoteTransform" parent="Mesh/Armature/Skeleton/BoneAttachment" index="0"]
|
||||
remote_path = NodePath("../../../../../TouchArea")
|
||||
|
||||
[editable path="Mesh"]
|
||||
Reference in new issue
Block a user