SpaceServer/Scripts/ThrustElement.gd

17 lines
414 B
GDScript

extends "res://Scripts/PlanElement.gd"
class_name ThrustElement
const MAX_LINEAR_THRUST : int = 1
const MAX_ROTATIONAL_THRUST : int = 1
var linear_thrust : Vector3 = Vector3(0, 0, 0)
var rotational_thrust : Vector3 = Vector3(0, 0, 0)
func sanity_check() -> bool:
if linear_thrust.length() > MAX_LINEAR_THRUST:
return false
if rotational_thrust.length() > MAX_ROTATIONAL_THRUST:
return false
return true