Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Author Topic: When I brake....  (Read 10033 times)

patmarrnc

  • Full Member
  • ***
  • Posts: 136
When I brake....
« on: December 19, 2017, 08:44:40 pm »

When I brake, the front end should dip as the shocks absorb the forward energy...

However, in my case, the front end lifts up when I brake.  I have changed just about every variable in my script to no avail. I've looked at other scripts for clues... but now I'm out of ideas.

Can anybody tell me what variable affects this?
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 763
  • Love OT!
Re: When I brake....
« Reply #1 on: December 20, 2017, 12:46:59 am »

Hi, Patmarrnc!
Perhaps some inverted axis in your model?
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: When I brake....
« Reply #2 on: December 20, 2017, 01:03:43 am »

Maybe the center of mass is below the axles - that would explain it.
Logged

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: When I brake....
« Reply #3 on: December 20, 2017, 06:04:51 pm »

Maybe the center of mass is below the axles - that would explain it.
That makes perfect sense... but it never would have occurred to me in a million years!  I bow to your excellent analytical thinking! Thank you!

Update:  I changed the model but front end still lifts upon braking

perhaps this error is significant?

00:34.188 INFO: Uploading package to GPU "patmarrnc/REDCAR_BLENDER"...

00:34.202 ERROR: center of mass clamped to the object's bounding box, from: x=0.054754, y=-0.053339, z=1.169973  to: x=0.054754, y=-0.053339, z=1.145915

05:21.046 ERROR: center of mass clamped to the object's bounding box, from: x=0.054754, y=-0.053339, z=1.169973  to: x=0.054754, y=-0.053339, z=1.145915

07:22.834 ERROR: center of mass clamped to the object's bounding box, from: x=0.054754, y=-0.053339, z=1.169973  to: x=0.054754, y=-0.053339, z=1.145915

08:48.147 ERROR: center of mass clamped to the object's bounding box, from: x=0.054754, y=-0.053339, z=1.169973  to: x=0.054754, y=-0.053339, z=1.145915
« Last Edit: December 20, 2017, 09:36:51 pm by patmarrnc »
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: When I brake....
« Reply #4 on: December 21, 2017, 01:14:10 am »

Right, it means the COM z coordinate is originally even outside the bounding box.
In vehicles the model pivot equals the COM, but it can be also adjusted by 'com' offset returned from init_vehicle.
Logged

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: When I brake....
« Reply #5 on: December 21, 2017, 10:29:27 am »

Interesting. When I load the car from the F7 asset menu, the bounding box is shown, along with an axis widget showing Z to be in the middle of the bounding box, where I placed it in the model.  But when I load it as a vehicle, I get the error message saying that COM is outside the bounding box.

I spent several hours last evening trying to apply the COM in the same syntax and location as I've seen it used elsewhere, but each time it crashed my script.  Thanks for your insights, apparently my understanding of how to place the center of an object needs some revision, as I'm not doing it correctly.

var Nose = "back to the grindstone"

Update: a misplaced bracket was shooting me in the foot... once I put it where it was supposed to be,  com:{z:0.3} fixed it!  Thanks for all your help!
« Last Edit: December 21, 2017, 11:02:32 pm by patmarrnc »
Logged