APX808
June 13, 2017, 11:35pm
1
Hey guys
My tank aims to the left of the crosshair and can’t figure out why, I even copy pasted the aiming functions from the course github and the same happens…
If I point straight the barrel is moved to the left, pointing up it seems to straighten, and looking down it gets even worse.
I checked the deprojection coordinates and its using the right values X 50% Y 33.3%
The tank shoots where the barrel points.
Has something like this hapened to you? Do you have an idea what could be happening?
Thanks
APX808
June 14, 2017, 12:58am
2
Finally found it
bool bHaveAimSolution = UGameplayStatics::SuggestProjectileVelocity
(
this,
OutLaunchVelocity,
StartLocation,
HitLocation,
LaunchSpeed,
false,
0,
0,
ESuggestProjVelocityTraceOption::DoNotTrace // Paramater must be present to prevent bug
);
The problem was with ESuggestProjVelocityTraceOption I had it set to TraceFullPath, setting it to DoNotTrace solves the issue.
One thing I learned during the course is that UE4 is full of bugs