15 lines
337 B
GDScript
15 lines
337 B
GDScript
extends RigidBody3D
|
|
|
|
class_name DroppableWeapon
|
|
|
|
const IMPULSE = 10
|
|
|
|
@export var slot: StringName
|
|
@export var weapon: WeaponSubStateMachine
|
|
@export var team: Session.TEAMS
|
|
|
|
@rpc("any_peer","call_local","reliable")
|
|
func drop(direction: Vector3,new_position: Vector3):
|
|
apply_impulse(direction * IMPULSE)
|
|
global_position = new_position
|
|
|