summaryrefslogtreecommitdiff
path: root/scripts/ballistics/NetworkedProjectile.gd
blob: 0626e9f37cf4aae245d7c55f6478506fde8e9d57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
extends RigidBody


var shooter = "WORLD"


# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.

func mp_init(init_info):
	for variable in init_info.keys():
		set(variable, init_info[variable])

remote func update_phys_transform(t, lv, av):
	transform = t
	linear_velocity = lv
	angular_velocity = av
	
func _integrate_forces(state):
	if is_network_master():
		rpc("update_phys_transform", transform, linear_velocity, angular_velocity)