https://github.com/berengma/aerotest
aerotest - an eagle mob for mobkit api and minetest
https://github.com/berengma/aerotest
eagle minetest-mod mob mobkit
Last synced: 23 days ago
JSON representation
aerotest - an eagle mob for mobkit api and minetest
- Host: GitHub
- URL: https://github.com/berengma/aerotest
- Owner: berengma
- License: lgpl-2.1
- Created: 2020-01-20T06:00:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-07T18:35:54.000Z (about 4 years ago)
- Last Synced: 2025-02-26T08:35:14.264Z (over 1 year ago)
- Topics: eagle, minetest-mod, mob, mobkit
- Language: Lua
- Homepage:
- Size: 3.54 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
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.