summaryrefslogtreecommitdiff
path: root/scenes/ballistics
diff options
context:
space:
mode:
Diffstat (limited to 'scenes/ballistics')
-rw-r--r--scenes/ballistics/Cannonball.tscn9
-rw-r--r--scenes/ballistics/Rocket.gd7
2 files changed, 6 insertions, 10 deletions
diff --git a/scenes/ballistics/Cannonball.tscn b/scenes/ballistics/Cannonball.tscn
index 294548d..83c3942 100644
--- a/scenes/ballistics/Cannonball.tscn
+++ b/scenes/ballistics/Cannonball.tscn
@@ -3,11 +3,11 @@
[ext_resource path="res://scripts/ballistics/Cannonball.gd" type="Script" id=1]
[sub_resource type="SphereShape" id=1]
-radius = 0.15
+radius = 0.25
[sub_resource type="SphereMesh" id=2]
-radius = 0.15
-height = 0.3
+radius = 0.2
+height = 0.4
radial_segments = 8
rings = 8
@@ -27,12 +27,11 @@ normal_scale = 1.0
normal_texture = SubResource( 5 )
[node name="Cannonball" type="RigidBody"]
-collision_layer = 5
-collision_mask = 15
mass = 10.0
continuous_cd = true
contacts_reported = 2
contact_monitor = true
+can_sleep = false
script = ExtResource( 1 )
[node name="CollisionShape" type="CollisionShape" parent="."]
diff --git a/scenes/ballistics/Rocket.gd b/scenes/ballistics/Rocket.gd
index 171a49e..46ca058 100644
--- a/scenes/ballistics/Rocket.gd
+++ b/scenes/ballistics/Rocket.gd
@@ -14,18 +14,15 @@ func _ready():
func get_init_info():
return {"linear_velocity" : linear_velocity, "angular_velocity" : angular_velocity, "life" : life, "shooter" : shooter, "shooter_id" : shooter_id}
-remote func update_phys_transform(t, lv, av):
- transform = t
- linear_velocity = lv
- angular_velocity = av
-
func _physics_process(delta):
+ print(global_transform.basis.x)
if life < lifetime:
add_central_force(global_transform.basis.x*strength)
life += delta
else:
rpc("explode")
$RocketTrail.emitting = false
+
remotesync func explode():
if cannot_explode: