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.

Pages: 1 [2]

Author Topic: speed vectors?  (Read 13987 times)

zzz

  • Sr. Member
  • ****
  • Posts: 266
  • newbie
Re: speed vectors?
« Reply #15 on: July 03, 2014, 06:36:13 pm »

hmm, this a screen of the angular readouts of the x-axis as the ship rolls left about 180 degrees/s.

http://s9.postimg.org/u2y3pesb3/screen_1404426459.jpg

Just in case my axis was wrong I tried the same whilst logging the y and z axis. They all stayed at very low numbers and none of them increased proportionately with the roll speed.

What turned me onto it was to stop my models sliding out of control I use this code to autocompensate:

Code: [Select]
var velo = this.velocity(1);
if (velo.linear.x > 0) {
  this.extra_force({y:0,z:0},{y:0,x:-latForce});
  }
if (velo.linear.x < 0) {
  this.extra_force({y:0,z:0},{y:0,x:latForce});
  }

and it works perfectly. When I use something similar to stop yawing or pitching it overshoots the zero point by some margin until it reverses speed, overshoots even more and eventually oscillates out of control, no matter how low the forces, speed and acceleration are.

Code: [Select]
if (velo.angular.x > 0) {
  this.extra_force({y:100,z:0},{z:0,x:-angForce});
  this.extra_force({y:-100,z:0},{z:0,x:angForce});
  }
if (velo.angular.x < 0) {
  this.extra_force({y:100,z:0},{z:0,x:angForce});
  this.extra_force({y:-100,z:0},{z:0,x:-angForce});
  }

edit: here's a screen with all 3 axis being logged.

http://s28.postimg.org/uhiaxd76l/screen_1404427168.jpg

at that time it was yawing right so fast it was a blur, with a slight pitch up and barely no roll.
« Last Edit: July 03, 2014, 06:41:30 pm by zzz »
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: speed vectors?
« Reply #16 on: July 03, 2014, 10:31:27 pm »

To me it seems you are detecting pitch (x axis), but acting on yaw.
Logged

zzz

  • Sr. Member
  • ****
  • Posts: 266
  • newbie
Re: speed vectors?
« Reply #17 on: July 04, 2014, 01:24:38 pm »

Seems you were right. That on top of working in m/s instead of rad/s and the compensators not working unless all 3 were active meant it couldn't do anything but oscillate out of control. Sorry for bothering you. :-[

But if it's any consolation the updated js file may save you having to make that UFO flight model.
Logged
Pages: 1 [2]