Tank doesn't aims straight

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

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 :frowning:

Privacy & Terms