Outerra forum
Anteworld - Outerra Game => Tech demo, support, updates => Topic started by: Bob425 on August 31, 2018, 02:22:47 pm
-
Under the new version, the US Coastguard boat sits very stern down, even when static, I have tried to correct this without any success.
(https://drive.google.com/uc?export=download&id=1_fSOiFEbl-rUCTc98dmJ4DyMPs4Gj_I5)
-
yes, all the boats I've created have the same problem. (I haven't tried changing the center of gravity in the script yet) I didn't really want to start changing the scripts (not my forte) until hearing if there is some other solution
-
yes, all the boats I've created have the same problem. (I haven't tried changing the center of gravity in the script yet) I didn't really want to start changing the scripts (not my forte) until hearing if there is some other solution
The strange thing is that two of my boats sit on an even keel, while others misbehave like the US Coastguard.
-
All of mine are very small (row boat, motor boat, kayak etc) and they worked "reasonably" OK in the previous version. I'm no javascript whiz, that's for sure. I usually take other peoples' scripts and mutilate them until the damage is acceptable to me. In the new version the small crafts not only sit unevenly in the water, they also perform erratically.
1) I can't seem to find a setting at which the crafts don't bob excessively in the water (going completely underwater then rising completely out of the water)
2) In the process of bobbing, the interior of the crafts appear to fill with water (would collision fix that?)
-
Hi, patmarrnc and Bob425!
I really don't have idea, but could the boats issue be related to the thread about vehicles bouncing?
https://forum.outerra.com/index.php?topic=3845.0
-
Cracked it!! The boat's center of gravity must be central, not one third back as normal, as shown below:-
(https://drive.google.com/uc?export=download&id=1YbvxLGzn4d9gKj4mByTFKKiIOAcLf9-h)
(https://drive.google.com/uc?export=download&id=1uQLrscPPCTr-xbY2EUgCV82q1nNW1FMW)
-
how to set the center of gravity of the boat ? I do not understand which of the parameters in the javascript file I need to change and which value to set.
-
how to set the center of gravity of the boat ? I do not understand which of the parameters in the javascript file I need to change and which value to set.
No, you do not understand, you have to make the changes to the model itself, using a 3D modelling program like MAX or Blender.
-
By default the center of mass is taken from model's pivot, but you can also modify it in the script by adding com property in parameters returned from init_chassis. That tells the distance to shift the COM from the pivot:
function init_chassis(){
return {
mass:18000,
hydro_h1:3,
hydro_h2:5,
hydro_uplift:6000,
Cx:{x:1.2, y:0.1, z:1.2, w:0.8},
com:{y:2}
};
}
-
By default the center of mass is taken from model's pivot, but you can also modify it in the script by adding com property in parameters returned from init_chassis. That tells the distance to shift the COM from the pivot:
function init_chassis(){
return {
mass:18000,
hydro_h1:3,
hydro_h2:5,
hydro_uplift:6000,
Cx:{x:1.2, y:0.1, z:1.2, w:0.8},
com:{y:2}
};
}
Thats very intersting, cameni.
If I had known this it would have saved me a lot of time.
Thank You.
-
thank you very much, Cameni!
You had already told me about how to change the center of gravity in the script (when my cars wer leaning sideways and tipping over), but I hadn't gotten around to trying it yet on my boats.
But I also appreciate your inclusion of some other variables that will probably work better than what I've got in my script.
-
Are there any variables in the boat's .js file to raise the bow when up to speed, a semi-planning attitude?
-
hydro_uplift
https://github.com/Outerra/anteworld/wiki/Vehicle%20Parameters
-
Many thanks, Cameni.
-
Are there any plans to add a bow wave to watercraft?
-
There are plans for everything :)
-
There are plans for everything :)
Cameni is GOD! :)) (of OT).
-
The plans have been set in motion.