Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: JS script question  (Read 3681 times)

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
JS script question
« 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 ?
Logged

ZeosPantera

  • ||>>-Z-<<||
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2520
  • #1 Outerra Fan Boy
    • My Youtube
Re: JS script question
« Reply #1 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.
Logged
"Fear accompanies the possibility of death, Calm shepherds its certainty" - General Ka Dargo

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: JS script question
« Reply #2 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.
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: JS script question
« Reply #3 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.
Logged

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: JS script question
« Reply #4 on: April 18, 2013, 05:01:54 pm »

Yep look like its the origin pivot that determine the COM. Thanks!
Logged