To be able to log some parameters I made the collision less deadly by defining a fuelstation density of 0.0001. When I now hit the fuelstation I bounce back instead of being killed. I added the code below to my test the worldScript
Code: Select all
this.shipCollided = function(who)
{
log(this.name,"Player Collided with "+ who)
log(this.name,"My Orientation: "+ player.ship.orientation+ " Other orientation: "+who.orientation)
log(this.name,"My subents: "+player.ship.subEntities);
if(player.ship.subEntities)
{
for (var i=0 ; i< player.ship.subEntities.length; i++)
{
log(this.name,"My subent: "+player.ship.subEntities[i].displayName+", "+player.ship.subEntities[i].orientation);
}
}
}
And it generated the next log:
Code: Select all
Player Collided with [Ship "Fuel Station" ID: 442 position: (11155.3, -3709.24, -69648) scanClass: CLASS_STATION status: STATUS_IN_FLIGHT]
My Orientation: (0.937606 + 0.00890373i + 0.00807399j - 0.347492k) Other orientation: (0.999936 + 0.00354944i + 0.0107217j - 0k)
My subents: [Ship "Caduceus Engine" ID: 0 position: (-4.5, -0.5, -60.5) scanClass: CLASS_NOT_SET status: STATUS_INACTIVE],[Ship "Caduceus Engine" ID: 0 position: (4.5, -0.5, -60.7) scanClass: CLASS_NOT_SET status: STATUS_INACTIVE],[Ship "Caduceus mount" ID: 0 position: (0, -2.6, 26) scanClass: CLASS_NOT_SET status: STATUS_INACTIVE],[Ship "Caduceus mount" ID: 0 position: (0, -2.6, 13) scanClass: CLASS_NOT_SET status: STATUS_INACTIVE],[Ship "Caduceus mount" ID: 0 position: (0, -2.6, 0) scanClass: CLASS_NOT_SET status: STATUS_INACTIVE],[Ship "Caduceus Turret" ID: 0 position: (8, -2.7, 26) scanClass: CLASS_NOT_SET status: STATUS_ACTIVE],[Ship "Caduceus Turret" ID: 0 position: (8, -2.7, 13) scanClass: CLASS_NOT_SET status: STATUS_ACTIVE],[Ship "Caduceus Turret" ID: 0 position: (8, -2.7, 0) scanClass: CLASS_NOT_SET status: STATUS_ACTIVE],[Ship "Caduceus Turret" ID: 0 position: (-8, -2.7, 26) scanClass: CLASS_NOT_SET status: STATUS_ACTIVE],[Ship "Caduceus Turret" ID: 0 position: (-8, -2.7, 13) scanClass: CLASS_NOT_SET status: STATUS_ACTIVE],[Ship "Caduceus Turret" ID: 0 position: (-8, -2.7, 0) scanClass: CLASS_NOT_SET status: STATUS_ACTIVE]
My subent: Caduceus Engine, (0.474839 - 0i - 0j - 0.495397k)
My subent: Caduceus Engine, (0.474839 - 0i - 0j - 0.495397k)
My subent: Caduceus mount, (1 - 0i - 0j - 0k)
My subent: Caduceus mount, (1 - 0i - 0j - 0k)
My subent: Caduceus mount, (1 - 0i - 0j - 0k)
My subent: Caduceus Turret, (0.430527 - 0.1469i - 0.688315j - 0.565057k)
My subent: Caduceus Turret, (0.430527 - 0.1469i - 0.688315j - 0.565057k)
My subent: Caduceus Turret, (0.430527 - 0.1469i - 0.688315j - 0.565057k)
My subent: Caduceus Turret, (0.686284 - 0.566312i + 0.431142j + 0.14974k)
My subent: Caduceus Turret, (0.686284 - 0.566312i + 0.431142j + 0.14974k)
My subent: Caduceus Turret, (0.686284 - 0.566312i + 0.431142j + 0.14974k)
This all seem to be valid data.