In this commit (Bug Fix in TankAimingComponent.cpp · DanielGillies/BattleTank@592a343 · GitHub). File TankAimingComponent.cpp, line 35. If you take out ESuggestProjVelocityTraceOption::DoNotTrace
and put in the default value of ESuggestProjVelocityTraceOption::TraceFullPath
, the function will return false most of the time. After putting in DoNotTrace, the function returned true the expected 100% of the time.
Hey TestyRabbit,
Thank you for the report. I was able to reproduce it on my end and have entered a issue report. You can follow the issue as it moves through the development team here:
I just wanted to let you know of the result of this issue is “by design” with this as to why:
The user uses a line trace to find the end location of the arc. They then use “TraceFullPath” which means we will only suggest the path if there are no blocking objects - but this can never succeed since the user’s end location will block the projectile.
One work around is to move the user’s end location back a bit:
EndLocation = StartLocation + (Hit.ImpactPoint - StartLocation) * 0.9f
Another is to pass ESuggestProjVelocityTraceOption::OnlyTraceWhileAscending. This will only check for blocking hits on the way up in the arc so for most cases the fact that the projectile will hit the end location should not matter.