Added Console

Debug commands can now be executed using an in-game console
This commit is contained in:
hyperion51 2020-04-28 01:50:50 +01:00
commit 75eb534983
305 changed files with 2975 additions and 17480 deletions

View file

@ -35,4 +35,22 @@ public class VelocityMatch : AgentBehavior
_entity.Axes[_thrust] = saturate(length(pow(saturate(dot(normalize(_entity.Direction),normalize(deltaV))), 8)*length(deltaV))*ThrustSensitivity);
}
}
public float2 MatchDistanceTime
{
get
{
var velocity = length(_entity.Velocity);
var deltaV = Objective.Velocity - _entity.Velocity;
var stoppingTime = length(deltaV) / _entity.Context.Evaluate((_thrust.Data as ThrusterData).Thrust, _thrust.Item, _entity) * _entity.Mass;
var stoppingDistance = stoppingTime * velocity / 2;
var angleDiff = _entity.Direction.AngleDiff(deltaV);
var turnaroundTime = angleDiff / _entity.Context.Evaluate((_turning.Data as TurningData).Torque, _turning.Item, _entity) * _entity.Mass;
var turnaroundDistance = turnaroundTime * velocity;
return float2(stoppingDistance + turnaroundDistance, stoppingTime + turnaroundTime);
}
}
}