As I read the answer here somewhere, so you cannot use apply impulse for KinematicBody, which would be a solution for smooth motion (slow-stop) - impulse only for RigidBody.
Only for KinematicBody play somehow with gravity?...or am I completely off?
So the solution- RigidBody and apply the impulse(for RigidBody only)
THIS is flying script for like a hovercraft where is set apply impulse to the RigidBody ("hovercraft") but the problem here is that when cornering to the left-right does not fly forward...I mean left-forward and right-forward.
(Sorry for my bad English)
extends Spatial
var h = ("hovercraft")
func _ready():
h = get_node("hovercraft")
self.set_process(true)
#Controls
func _process(delta):
if Input.is_action_pressed("move_up"):
h.apply_impulse(Vector3(0, 0, 0), Vector3(0, 0.5, 0))
if Input.is_action_pressed("move_down"):
h.apply_impulse(Vector3(0, 0, 0), Vector3(0, -0.5, 0))
if Input.is_action_pressed("rotate_right"):
h.set_angular_velocity(Vector3(0,-1,0)*deg2rad(25));
if Input.is_action_pressed("rotate_left"):
h.set_angular_velocity(Vector3(0,1,0)*deg2rad(25));
if Input.is_action_pressed("forward"):
h.apply_impulse(Vector3(0, 0, 0), Vector3(0, 0, -0.2))
if Input.is_action_pressed("brake"):
h.apply_impulse(Vector3(0, 0, 0), Vector3(0, 0, 0.2))