Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3405259204
You can test them both to see the differences between your generated forces and mine.
I have no complains just opinion (as i was just expecting real life physics)
If in case my observations where wrong or misleading sorry - did not spend too much time in your code and english is not my first language.
Either way i'll be waiting for updates to see how it goes for you. And in a mean time i think i'll try to create my own interpretation of realistic aerodinamics (not promising it will be better)
When you close a window script is still working in a background.
To turn of script you need to implement UnloadScript function in your code
Personally i call this function in Window.OnClose event listener
Sorry, what do you mean, like the script isnt being closed when you close down the UI?
And the shape, i will add logic for this too ofcourse. I appreciate your feedback though, ill look into many of these points today, and see what i can do! :) Thanks for the kind words
Long story short - as an attempt it is really straight forward and impressive. And if it raises an aircraft up to the sky it does it's job
4. this should have been expected, but on complex creations script really takes out frame rate - not sure if any optimizations could be done be mindful of that
5. i tested this script with car. good news - it did not lift off :D. But drag was too big - My theoretical calculations shows that without drag car should reach 586 km\h (in game without script reaches ~570 km/h) and with drag should reach ~380 km/h (in game with script only reaches 140 km/h). This might be doe to aerodynamics effecting parts that should not be effected, or effecting parts in incorrect direction.
1. please call "UnloadScript.Raise( <ScriptName> )" function on main windows close - because now script is not being offloaded after closing main window.
2. i truly imagined that you where checking part shapes and orientations in regards to velocity direction. While i do see you calculating separate velocities of separate parts i do not find anything related to part shapes.
* for example image two wings of same area, but one has long wing span and short wing root (10:1) while other is has medium wing span and medium wing root (5:5) - how do you think which wind will have more list and which will have more drag if both of them are in the same angle ?
* this is the most important and most head hurting part.
Also i forgot to mention, you asked about mass and i said no it doesnt change it, it does actually change it, because the objects have different masses in game, meaning theyre differently hard to move, lightweight objects are affected MASSIVELY by drag, while heavy arent as much, so the logic is there, i just didnt manually add it.
Now i have an idea of what to expect in code
I'll review it and come back to you again in case i see an area for improvement.
And just a question hefore hand:
In case after seeing you approach, i'll dice that there is a better way to do this (but the one that would require rewriting most of your code) - are you cool if i would just compile my own script and share it with reference to yours ?
I can try to explain it, i cant go too detailed due to max characters though.
First of all, it finds all objects, filters them , then stores them in a table, with their size. Then loops through the stored table calculate the local velocity. And skipping some parts of the code, it calculates lift by some math using a mix of Y velocity, Area, and a tiny bit of the X/Z velocity. It calculates drag in the similar way, then, this is all applied to the object in the opposite direction, so if its moving upward at a speed of 300 units, itll apply a force downwards with a force of 300 units * area + other stuff, same for downward, so it dampens the vectors, which effectively creates lift and drag
Yes, it does take into account the part size, both for drag and for lift. And i think, if i understand your question correctly, that yes, it calculates area affected by air friction. Thicker blocks have hugely much more drag and work way worse as lift surfaces.
6
No, but its an interesting idea, i like it, ill look at this honestly.
7
It does apply calculations to all the parts yes, it doesnt separate which parts are outside and should be affected, you could enclose a plate within boxes and it would still have the forces, but i have been considering, adding some logic for it to sense what sides are blocked, and negate lift/drag on those sides.
comment 2/2 (Max character limit was being gay)
Thanks forthe questions dude :) Dont hesistate to ask again if you have more!
1
Both lift and drag :)
2
No, at the moment it doesnt take into account the weight to calculate any kind of momentum.
3
Ofcourse, its the base of how it all works, it uses velocity as the primary source of info!
4
Yes absolutely! Its fully local to the object, you can fly a plane upside down, sideways, anything, its all local and works nonetheless
comment 1/2
Straight away i hane miltiple questions:
* Does it only create lift or drag too ?
* Does it take into acoount part weight to calculate momentum, or are you fully relying on momentum calculated by game ?
* Does it take into account speed/velocity (as both lift and drag depends on it)
* Does it take into account part rotation in space compared to direction of velocity ?
* Does it take into account part size ? And deas it calculate area effected by air friction ?
* Does it take into account material friction (because depending on it, instead of a good lift you might get unintended drag) ?
* Does it aply calculations to all parts ? Or does it somehow identify/seperate which parts are outside and should be effected ?
Before i dive into the code (with the intent to help you improve this script), i was hoping you could explain the basic logick behind the mechanics.