I'm trying to make an object go upwards when a key is pressed - this code doesn't work:
extends Spatial
var flprop
func _ready():
flprop = get_node("flprop")
self.set_process(true)
func _process(delta):
if Input.is_action_pressed("drone_up"):
flprop.apply_impulse(Vector3(0, 0, 0), Vector3(0, 10, 0))
but if I move the flprop.apply_impulse()
line into the _ready
function, the object does have the force applied.