fix: MunitionEntity 插值到精确释放高度 + 修正 System.Math 引用
This commit is contained in:
parent
355b430828
commit
43426ab5fc
@ -84,7 +84,7 @@ namespace CounterDrone.Core.Simulation
|
||||
float tPrev = _time - deltaTime;
|
||||
var (px0, py0, pz0) = Kinematics.ParabolicPosition(
|
||||
_startX, _startY, _startZ, _launchAngle, _azimuth, _muzzleVelocity, tPrev);
|
||||
float frac = (ReleaseAltitude - py0) / Math.Max(0.01f, PosY - py0);
|
||||
float frac = (ReleaseAltitude - py0) / System.Math.Max(0.01f, PosY - py0);
|
||||
PosX = px0 + (PosX - px0) * frac;
|
||||
PosY = ReleaseAltitude;
|
||||
PosZ = pz0 + (PosZ - pz0) * frac;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user