Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: M7 on April 17, 2013, 08:28:32 pm

Title: JS script question
Post by: M7 on April 17, 2013, 08:28:32 pm
I'm stuggling atm to keep a vehicle i just import, from tumbling all over the place. I know it's got something to do with the COM (center of mass). Is there a way to know what numbers to put in without guessing too much. Like for example    com:{z:0, x:0, y:0}  where is it supposed to be situated? at one corner of the model box  ? at the axis set  for the chassis component ?
Title: Re: JS script question
Post by: ZeosPantera on April 17, 2013, 09:55:19 pm
0 0 0 should be dead center of the bounding box in all directions. Which vehicle are you trying this on? If you want to send it to me via PM I will give it a look.
Title: Re: JS script question
Post by: M7 on April 17, 2013, 10:43:48 pm
well i was testing with  basic shapes vehicle made in sketchup but i must have mess it up in sketchup .

 But in the mean time i imported a wheel panzer with a big gun and was able to get stable on its wheel. Should be able to show it very soon.
Title: Re: JS script question
Post by: cameni on April 18, 2013, 03:16:03 pm
0 0 0 is in the model's pivot. In most modelers you can specify it, and thus to have the center of mass defined that way without the need to do anything in the script. But I don't know how to set it in Sketchup, maybe it takes the origin for it.
Title: Re: JS script question
Post by: M7 on April 18, 2013, 05:01:54 pm
Yep look like its the origin pivot that determine the COM. Thanks!