Rynchodon / ARMS

ARMS mod for Space Engineers
Creative Commons Zero v1.0 Universal
18 stars 17 forks source link

weapon control #96

Closed AngelCry closed 9 years ago

AngelCry commented 9 years ago

hi. may be i wrong, but looks like something wrong with targeting. i have some small ship with 3 turret on top of it. each turret have command line [(Turret, Rocket, Gatling) ; AllGrid ; Range 1500] so they will fire in any enemy weapons (i also have fMaxWeaponRange=3000 in settings, so 1500 in turrets command will be ok). btw, any turret wont fire even when Weapon Platform Gatling (Space Pirates, you know) come at 800m and start firing. there nothing between my turrets and Weapon Platform Gatling, for sure. so, i comment out System.Diagnostics.Conditional to get debug in log and found turrets actually try target but Gatling Turret on Platform is blacklisted. can you check what wrong and fix it if possible? here log

Rynchodon commented 9 years ago

I will look into it.

AngelCry commented 9 years ago

while i waiting, i found funny thing: as there too much code to understand how it work, i test simpliest thing - just return "true" from CanRotateTo even if check failed. this way my turrets finally start firing and even hit is target. while i not sure if they hit just accidentally, but at least i get a bit more info to show, including some coordinates/vectors, hope they say you more than me: http://pastebin.com/n63BWYC7 i cut a part which looks most important, later most things just repeated. for me is looks as something wrong with direction, because i found message "normal turret obstructed by block: Large Reactor of grid Wing" and is really strange because Wing - is ship with turrets and they sit on top, reactor - under them and enemy - just in front of me. add: forget to say. another strange thing - when i hack CanRotateTo, turrets keep firing even after traget (Gatling Turret) get destroyed (im sure because i found "block removed: Gatling Turret" in log. btw is looks more like is vanila AI because there just few messages with "RotateAndFire()" in log after "block removed".

AngelCry commented 9 years ago

sry for disturb but... any news? if you still not ready apply some changes to git, i will be happy even about some possible fix (which i can apply by self and then test).

Rynchodon commented 9 years ago

Sorry, I have been busy trying to get autopilot working on planets. If you test with the latest master and use the "Interior" command in the turret it should work. The size and shape of the turret makes the aim a little off.

AngelCry commented 9 years ago

thanks. so, as i see in docs, with "Interior" less obstruction tests that will be performed. makes sense. want to be sure if i understand correctly: "The size and shape of the turret" - you mean target (enemy) turret here (vanila Gatling in this case)? also, forget to mention before, i used turrets from mod, not vanila, so now not sure, may or may not this affect as well. is so called "Small Ship Cannon Turret" and they have a bit different stats, most noticeable - rotation/elevation speeds: 0.00024 both. definition limits different as well, but i think you seen them already in log. anyway, thanks for your work and so cool mod! this mod is one of those "once you try, you cant play without anymore" XD

Rynchodon commented 9 years ago

I was referring to the "Small Ship Cannon Turret" (SSCT). SE doesn't reveal the location of the gun barrel so ARMS assumes it is in the centre of the block. For the SSCT, the barrel can move away from the centre and then ARMS will miss the target slightly. More technically, the accuracy decreases the closer the target's direction is to the minimum or maximum azimuth of the SSCT.