Some collision testing

This commit is contained in:
karl 2020-01-31 22:34:46 +01:00
parent eec4a4bdce
commit 3a9b2ee771
5 changed files with 1253 additions and 0 deletions

1062
3D Input/untitled.glb.import Normal file

File diff suppressed because it is too large Load Diff

15
Ingame/BodyParts/Arm.gd Normal file
View File

@ -0,0 +1,15 @@
extends RigidBody
onready var anim = get_node("AnimationPlayer")
onready var skeleton = get_node("Armature/Skeleton")
func _unhandled_input(event):
if event is InputEventKey:
if event.pressed and event.scancode == KEY_A:
play()
func play():
anim.play("ArmatureAction001")

143
Ingame/BodyParts/Arm.tscn Normal file

File diff suppressed because one or more lines are too long

31
Ingame/Testing.tscn Normal file
View File

@ -0,0 +1,31 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://Ingame/BodyParts/Arm.tscn" type="PackedScene" id=1]
[sub_resource type="PlaneMesh" id=1]
size = Vector2( 10, 10 )
[sub_resource type="ConcavePolygonShape" id=2]
data = PoolVector3Array( 5, 0, 5, -5, 0, 5, 5, 0, -5, -5, 0, 5, -5, 0, -5, 5, 0, -5 )
[node name="Spatial" type="Spatial"]
[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 )
mesh = SubResource( 1 )
material/0 = null
[node name="StaticBody" type="StaticBody" parent="MeshInstance"]
[node name="CollisionShape" type="CollisionShape" parent="MeshInstance/StaticBody"]
shape = SubResource( 2 )
[node name="Camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 0.866025, 0.5, 0, -0.5, 0.866025, 0, 6, 8 )
[node name="Arm" parent="." instance=ExtResource( 1 )]
transform = Transform( 3.87553e-08, -0.0559087, -0.998436, -8.97299e-08, -0.998436, 0.0559087, -1, 8.74228e-08, -4.37114e-08, 0, 4, 0 )
[node name="DirectionalLight" type="DirectionalLight" parent="."]
transform = Transform( 0.999532, 0.0126075, 0.027872, -0.0305909, 0.411942, 0.910697, 0, -0.911123, 0.412135, 0, 0, 0 )
shadow_enabled = true

View File

@ -1,5 +1,7 @@
[gd_resource type="Environment" load_steps=2 format=2] [gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1] [sub_resource type="ProceduralSky" id=1]
[resource] [resource]
background_mode = 2 background_mode = 2
background_sky = SubResource( 1 ) background_sky = SubResource( 1 )