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: Functions  (Read 5293 times)

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Functions
« on: February 06, 2016, 02:43:03 pm »

Hi cameni!

RU:
Я сделал функцию "relative_pos()" которая определяет позицию по заданным параметрам.
У меня сильное чувство, что я сделал что то не так.
Что бы снизить частые краши движка во время создания объекта на вычисленной позиции, мне пришлось ввести пятый параметр "addZ", при создании определённых моделей без этого корректирующего параметра вообще не обойтись.

Этот негативный эффект проявляется при вызове метода
$world.create_instance()
Для объектов с физикой.

Со статичными объектами нет проблем!

Помогите прояснить ситуацию.

Translate:
I made a function "relative_pos()"  that determines the position of the specified parameters.
I have a strong feeling that I did something wrong.
To reduce the frequent crash of the engine during the creation of the object on the calculated position, I had to enter the fifth option "addZ", when creating certain models without this adjustment parameter does not do.

This negative effect is shown when calling
$World.create_instance()
For objects with physics.

With static objects do not have problems!

Help to clarify the situation.

Call function:
Code: [Select]
var pos = this.geom.get_pos();
var rot = this.geom.get_rot();
var distance = 15; // meter
var angle = 0; // degree
var addZ = 10;

pos = relative_pos(pos, rot, distance, angle, addZ);

this.obj_0 = $world.create_instance("SteelRat/Model/Model", pos, rot, false);
Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: Functions
« Reply #1 on: June 14, 2016, 01:41:57 pm »

`
« Last Edit: June 14, 2016, 08:03:03 pm by SteelRat »
Logged