#Missile Turning Thruster Stays On Despite 0 degree from target

6 messages · Page 1 of 1 (latest)

plain rapids
#

(Rip Sean's missile rotation woes rambottrollface )
Version: 4.3.0.53, alphatest branch

Repro: put vls Prefab along with sufficient ammo and detection, spawn enemy (tested against DWG Duster and WF Repentance )
Expected: Turning thruster activates, then shuts off when missile points at target
Actual: Despite 0.03 angle between missile forward and vector from missile to target, turning thrusters stay on until missile reaches sufficient speed

fleet raft
#

@slate gorge Got any ideas? I'm out most of today.

slate gorge
# fleet raft <@254055124203208704> Got any ideas? I'm out most of today.

In bread missiles, the activation angle input takes a value from 0-180 rather than 5-180. However, setting it higher does not consistently solve this problem

Guessing that in here (BrilliantSkies.Ftd.Missiles.Blueprints.MissileMovementControl.RotationControl), the current and target rotations still include different roll angles because LookRotation defaults to Vector3.Up for the second argument so the angle between them is large even if the nose is pointing the same way

Quaternion quaternion = ((vector == Vector3.zero) ? _missile.Rigidbody.rotation : ((!(vector.normalized == Vector3.zero)) ? Quaternion.LookRotation(vector.normalized) : _missile.Rigidbody.rotation));
Quaternion rotation = _missile.Rigidbody.rotation;
float num = _missile.Blueprint.MovementInfo.TurnRate(_missile.Position.y, _missile.VelocityForward);
float num2 = Quaternion.Angle(quaternion, rotation);
if (_turningThrusters.Count > 0)
{
foreach (MissileTurningThruster turningThruster in _turningThrusters)
{
num += turningThruster.GetTurnBonus(num2, aimPoint);
}
}

fleet raft
#

Ok thanks, will investigate probably later tonight or tomorrow

fleet raft
#

Think I've fixed this