Not done a scene in ages so i have decided to try to make something similar to a K-wing, but that allows the wing to "Stall" at low speed, and unresponsive a very high speed, this is more similar to real wings of aircraft.
It is done by using a squared term, eg, force = velocity^2, so at low speed there is no resistive force, but at high speeds there is lots.
Controls;
UP/DOWN - Down/up
G - Landing Gear Up/down (Toggled)
B - Landing gear brakes
RETURN - Power
Please post suggestions, guns missles will be added last.
And if you want to mess around and improve thats fine, just give credit for the ideas
Code;
(e)=>{
ControllerAcc = ((((friction - e.pos(0)) / 0.01) ^ 2 + ((restitution - e.pos(1)) / 0.01) ^ 2) ^ 0.5);
friction = e.pos(0);
restitution = e.pos(1);
scene.addcircle({
pos := e.pos;
vel := e.this.ControllerAcc;
color := [1, 1, 1, 1];
radius := 0.2;
collideset := 32;
heterocollide := true;
friction := 0.0;
restitution := 0.0;
airfrictionmult := +inf;
density := (1 + ControllerAcc / 60) ^ 2
})
}