Works fairly well, although it doesn't account for changing acceleration which happens due to the changing gravity. I guess this is good enough, since it does hit if the player isn't careful
25 lines
972 B
Plaintext
25 lines
972 B
Plaintext
[gd_scene load_steps=4 format=2]
|
|
|
|
[ext_resource path="res://ShootyEnemy.gd" type="Script" id=1]
|
|
|
|
[sub_resource type="PrismMesh" id=1]
|
|
|
|
[sub_resource type="ConcavePolygonShape" id=2]
|
|
data = PoolVector3Array( 0, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, -1, -1, -1, -1, 1, -1, -1, 0, 1, 1, 0, 1, -1, 1, -1, 1, 0, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, -1, 0, 1, 1, -1, -1, -1, 0, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1 )
|
|
|
|
[node name="ShootyEnemy" type="KinematicBody"]
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="MeshInstance" type="MeshInstance" parent="."]
|
|
transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0 )
|
|
mesh = SubResource( 1 )
|
|
material/0 = null
|
|
|
|
[node name="CollisionShape" type="CollisionShape" parent="."]
|
|
transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0 )
|
|
shape = SubResource( 2 )
|
|
|
|
[node name="ShotTimer" type="Timer" parent="."]
|
|
process_mode = 0
|
|
autostart = true
|