Hi Dave, thank you for the reply.
I'm asking how to get the plane to behave similar to the ones in the video above when controlled - I have some (albeit limited) experience with 'all other aspects' such as animation etc.
I'm trying to get the plane to rev the engine and pick up speed when 'ui_up' is pressed and then to move forward and to take off when some speed limit is reached - and to stall when speed is too low for the angle etc.
For now i have this for the control/behaviour of the plane (totally not behaving as I want to) - Perhaps this requires a lot more than I imagine :
extends KinematicBody2D
export (int) var speed = 500
export (float) var rotation_speed = 1.5
export (float) var friction = 0.65
var velocity = Vector2()
var rotation_dir = 0
var acc = Vector2()
func _ready():
pass
func _physics_process(delta):
rotation_dir = 0
if Input.is_action_pressed('ui_right'):
rotation_dir += 3
if Input.is_action_pressed('ui_left'):
rotation_dir -= 3
if Input.is_action_pressed('ui_up'):
acc = Vector2(0, -speed).rotated(rotation)
elif Input.is_action_pressed('ui_down'):
acc = Vector2(0, speed).rotated(rotation)
else:
acc = Vector2(0, 0)
velocity += acc * delta
rotation += rotation_dir * rotation_speed * delta
move_and_slide(velocity, Vector2(0, 0))
velocity = velocity.linear_interpolate(Vector2(0,0), friction * delta)
I've found this 2d-plane example (using a Rigidbody2d):
https://github.com/leopnt/Godot-2D-plane-model
But I'm leaning toward that this is too simulation-overkill and detrimental to a more 'arcade feel' to the controls.