2022-04-07 20:32:52 +02:00
2020-01-28 15:34:23 +07:00
2020-10-17 14:06:41 +02:00
2020-10-17 14:06:41 +02:00
2020-10-17 14:06:41 +02:00
2022-04-07 20:32:52 +02:00
2022-04-07 20:32:52 +02:00
2022-04-07 20:32:52 +02:00
2022-04-07 20:32:52 +02:00
2020-03-03 11:20:22 +07:00
2020-10-17 14:59:52 +02:00
2020-01-25 22:32:46 +07:00
2020-10-17 14:59:52 +02:00
2022-04-07 20:32:52 +02:00
2020-10-17 14:59:52 +02:00

aerotest

King of the sky - eagle a mob for mobkit

implementation:

it's done using low level behaviors as opposed to plain functions, because pitch/roll changes must be gradual so there's a need to maintain states over time.

function aerotest.lq_fly_pitch(self,lift,pitch,roll,acc,anim)
    this one tries to maintain constant pitch. Flight looks stable, but the thing can stall and fall if velocity too low. The example uses this one exclusively.
    
function aerotest.lq_fly_aoa(self,lift,aoa,roll,acc,anim)
    tries to maintain constant angle of attack. makes them less prone to stalling, but they tend to oscillate after abrupt changes of flight parameters. this one's very WIP.
    
params:

    lift: [number]
    multiplier for lift. faster objects need less, slower need more. typical value: 0.6 for speeds around 4 m/s

    pitch: [degrees]
    angle between the longitudinal axis and horizontal plane. typical range: <-15.15>

    aoa:
    [degrees] angle of attack - the angle between the longitudinal axis and velocity vector.

    roll: [degrees]
    bank angle. positive is right, negative is left, this is how they turn. if set too large they'll loose height rapidly

    acc: [number]
    propulsion. use with positive pitch to make them fly level or climb, set it to 0 with slight negative pitch to make
    them glide. typical value: around 1.0

    anim: [string]
    animation.

The example uses two simple high level behaviors to keep them between 18 and 24 nodes above ground, seems good already for ambient type flying creatures. warning: never set_velocity when using these behaviors.

Description
No description provided
Readme 3.5 MiB
Languages
Lua 100%