Shapes
This commit is contained in:
parent
84a4d375ca
commit
50e582f6d3
@ -24,7 +24,12 @@ func _physics_process(delta):
|
|||||||
if body.name == "StaticBody":
|
if body.name == "StaticBody":
|
||||||
if current_angle > 0.3:
|
if current_angle > 0.3:
|
||||||
apply_torque_impulse(rot_vector * current_angle * 7)
|
apply_torque_impulse(rot_vector * current_angle * 7)
|
||||||
|
apply_impulse(transform.basis.xform(Vector3.ZERO), -(transform.basis.y) * 0.05)
|
||||||
elif current_angle > 0.05:
|
elif current_angle > 0.05:
|
||||||
apply_torque_impulse(-(rot_vector * current_angle * 20))
|
apply_torque_impulse(-(rot_vector * current_angle * 5))
|
||||||
else:
|
else:
|
||||||
angular_velocity = Vector3.ZERO
|
angular_velocity = Vector3.ZERO
|
||||||
|
|
||||||
|
for axis in angular_velocity:
|
||||||
|
if axis > 10:
|
||||||
|
axis -= axis * 0.75
|
||||||
|
@ -5,30 +5,30 @@
|
|||||||
[ext_resource path="res://3D Input/Fertige GLBs/Bein_Frosch.glb" type="PackedScene" id=3]
|
[ext_resource path="res://3D Input/Fertige GLBs/Bein_Frosch.glb" type="PackedScene" id=3]
|
||||||
[ext_resource path="res://3D Input/froschtexture.png" type="Texture" id=4]
|
[ext_resource path="res://3D Input/froschtexture.png" type="Texture" id=4]
|
||||||
|
|
||||||
[sub_resource type="BoxShape" id=2]
|
[sub_resource type="BoxShape" id=1]
|
||||||
extents = Vector3( 0.649825, 2.07811, 1.64282 )
|
extents = Vector3( 0.666, 2.41488, 1.57924 )
|
||||||
|
|
||||||
[sub_resource type="SphereShape" id=3]
|
[sub_resource type="SphereShape" id=2]
|
||||||
radius = 0.115004
|
radius = 0.115004
|
||||||
|
|
||||||
[sub_resource type="SpatialMaterial" id=1]
|
[sub_resource type="SpatialMaterial" id=3]
|
||||||
albedo_texture = ExtResource( 4 )
|
albedo_texture = ExtResource( 4 )
|
||||||
roughness = 0.3
|
roughness = 0.3
|
||||||
|
|
||||||
[node name="FrogLeg" instance=ExtResource( 1 )]
|
[node name="FrogLeg" instance=ExtResource( 1 )]
|
||||||
transform = Transform( -1, 8.74228e-08, 0, -8.74228e-08, -1, 0, 0, 0, 1, 0, 0, 0 )
|
transform = Transform( -1, 8.74228e-08, 0, -8.48803e-08, -0.970917, 0.239415, 2.09303e-08, 0.239415, 0.970917, 0, 0, 0 )
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
cost = 30.0
|
cost = 30.0
|
||||||
|
|
||||||
[node name="PartCollider" parent="." index="0"]
|
[node name="PartCollider" parent="." index="0"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.21377, -0.911304, -3.94992 )
|
transform = Transform( 1, -6.77822e-08, -8.51879e-08, -6.77823e-08, 0.224662, -0.974437, 8.5188e-08, 0.974437, 0.224662, 1.61495e-07, -1.52524, -2.85154 )
|
||||||
shape = SubResource( 2 )
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
[node name="TouchArea" parent="." index="1"]
|
[node name="TouchArea" parent="." index="1"]
|
||||||
transform = Transform( 2.2019, -0.624093, -2.57245, 1.35866, 3.13817, 0.40161, 2.27179, -1.27191, 2.25313, 0.307055, -2.49965, -4.98782 )
|
transform = Transform( 2.20191, -0.624093, -2.57245, 1.26297, 3.18838, 0.307522, 2.32635, -1.14024, 2.26789, 0.307056, -2.38919, -4.91366 )
|
||||||
|
|
||||||
[node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"]
|
[node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"]
|
||||||
shape = SubResource( 3 )
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
[node name="Mesh" parent="." index="2" instance=ExtResource( 3 )]
|
[node name="Mesh" parent="." index="2" instance=ExtResource( 3 )]
|
||||||
transform = Transform( -1.13133e-08, 4.2222e-08, 1, 0.965926, 0.258819, 0, -0.258819, 0.965926, -4.37114e-08, 0.734499, -2.94707, -2.68774 )
|
transform = Transform( -1.13133e-08, 4.2222e-08, 1, 0.965926, 0.258819, 0, -0.258819, 0.965926, -4.37114e-08, 0.734499, -2.94707, -2.68774 )
|
||||||
@ -37,11 +37,11 @@ transform = Transform( -1.13133e-08, 4.2222e-08, 1, 0.965926, 0.258819, 0, -0.25
|
|||||||
bones/3/bound_children = [ NodePath("BoneAttachment") ]
|
bones/3/bound_children = [ NodePath("BoneAttachment") ]
|
||||||
|
|
||||||
[node name="froschbein" parent="Mesh/Armature/Skeleton" index="0"]
|
[node name="froschbein" parent="Mesh/Armature/Skeleton" index="0"]
|
||||||
transform = Transform( 1, -1.49012e-08, 0, 0, 1, -5.96046e-08, 0, 2.98023e-08, 1, 0, 0, 0 )
|
transform = Transform( 1, -1.11759e-08, 0, 1.86265e-09, 1, -5.96046e-08, 1.86265e-09, 0, 1, 0, 0, 0 )
|
||||||
material/0 = SubResource( 1 )
|
material/0 = SubResource( 3 )
|
||||||
|
|
||||||
[node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"]
|
[node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"]
|
||||||
transform = Transform( -0.207654, -0.97489, 0.0804374, -0.106263, -0.059262, -0.99257, 0.972414, -0.214658, -0.091288, 0.208948, 1.33566, -0.895561 )
|
transform = Transform( -0.176573, -0.978358, 0.107882, -0.111435, -0.0890297, -0.989776, 0.97796, -0.186789, -0.0933024, 0.184057, 1.31383, -0.875628 )
|
||||||
bone_name = "bone_3"
|
bone_name = "bone_3"
|
||||||
|
|
||||||
[node name="RemoteTransform" type="RemoteTransform" parent="Mesh/Armature/Skeleton/BoneAttachment" index="0"]
|
[node name="RemoteTransform" type="RemoteTransform" parent="Mesh/Armature/Skeleton/BoneAttachment" index="0"]
|
||||||
@ -50,4 +50,9 @@ remote_path = NodePath("../../../../../TouchArea")
|
|||||||
[node name="AnimationPlayer" parent="Mesh" index="2"]
|
[node name="AnimationPlayer" parent="Mesh" index="2"]
|
||||||
playback_speed = 2.0
|
playback_speed = 2.0
|
||||||
|
|
||||||
|
[node name="CollisionPolygon" type="CollisionPolygon" parent="." index="3"]
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_group_": true
|
||||||
|
}
|
||||||
|
|
||||||
[editable path="Mesh"]
|
[editable path="Mesh"]
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
[ext_resource path="res://3D Input/beinimage.png" type="Texture" id=4]
|
[ext_resource path="res://3D Input/beinimage.png" type="Texture" id=4]
|
||||||
|
|
||||||
[sub_resource type="BoxShape" id=1]
|
[sub_resource type="BoxShape" id=1]
|
||||||
extents = Vector3( 0.666, 2.41488, 1.555 )
|
extents = Vector3( 0.666, 2.5097, 1.57924 )
|
||||||
|
|
||||||
[sub_resource type="SphereShape" id=2]
|
[sub_resource type="SphereShape" id=2]
|
||||||
radius = 0.108468
|
radius = 0.108468
|
||||||
@ -36,9 +36,6 @@ transform = Transform( 2, 0, 0, 0, 2, 0, 0, 0, 2, -2.84217e-14, -4.37555, -0.049
|
|||||||
[node name="Armature" parent="Mesh" index="2"]
|
[node name="Armature" parent="Mesh" index="2"]
|
||||||
transform = Transform( 1.97878, 0, 0, 0, -1.97636, 0.0978612, 8.47033e-22, -0.0978612, -1.97636, -1.33227e-14, 2.34477, 0.0119585 )
|
transform = Transform( 1.97878, 0, 0, 0, -1.97636, 0.0978612, 8.47033e-22, -0.0978612, -1.97636, -1.33227e-14, 2.34477, 0.0119585 )
|
||||||
|
|
||||||
[node name="Skeleton" parent="Mesh/Armature" index="0"]
|
|
||||||
bones/2/bound_children = [ NodePath("BoneAttachment") ]
|
|
||||||
|
|
||||||
[node name="Cube" parent="Mesh/Armature/Skeleton" index="0"]
|
[node name="Cube" parent="Mesh/Armature/Skeleton" index="0"]
|
||||||
transform = Transform( 1, 0, -8.88178e-16, -1.42109e-14, 1, -2.23517e-08, 4.44089e-16, 2.23517e-08, 1, 0, 0, 0 )
|
transform = Transform( 1, 0, -8.88178e-16, -1.42109e-14, 1, -2.23517e-08, 4.44089e-16, 2.23517e-08, 1, 0, 0, 0 )
|
||||||
material/0 = SubResource( 3 )
|
material/0 = SubResource( 3 )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user