removed useless stuff

This commit is contained in:
2024-12-16 12:31:56 +03:00
parent 2488388aa4
commit ce9da76413
12 changed files with 13 additions and 89 deletions

View File

@@ -10,9 +10,12 @@ namespace omath::prediction
{
Vector3 Projectile::PredictPosition(const float pitch, const float yaw, const float time, const float gravity) const
{
auto currentPos = m_origin + omath::source::ForwardVector({source::PitchAngle::FromDegrees(-pitch), source::YawAngle::FromDegrees(yaw), source::RollAngle::FromDegrees(0)}) * m_launchSpeed * time;
currentPos.z -= (gravity * m_gravityScale) * std::pow(time, 2.f) * 0.5f;
auto currentPos = m_origin + source::ForwardVector({source::PitchAngle::FromDegrees(-pitch),
source::YawAngle::FromDegrees(yaw),
source::RollAngle::FromDegrees(0)}) *
m_launchSpeed * time;
currentPos.z -= (gravity * m_gravityScale) * (time * time) * 0.5f;
return currentPos;
}
}
} // namespace omath::prediction