2023-11-11 16:12:46 -07:00
|
|
|
extends RigidBody3D
|
2023-11-11 17:24:52 -07:00
|
|
|
class_name Billiard
|
|
|
|
|
2023-11-11 18:48:23 -07:00
|
|
|
@export var power_min := 0.01
|
|
|
|
@export var power_max := 5.0
|
|
|
|
|
2023-11-11 17:24:52 -07:00
|
|
|
var can_hit = true
|
|
|
|
|
2023-11-11 18:48:23 -07:00
|
|
|
func hit(impulse: Vector3, power: float):
|
|
|
|
apply_central_impulse(impulse * lerp(power_min, power_max, power))
|