nbenven95 / BattleTank

Second major project in the Udemy Unreal Engine 4 course (project is actually C++, github seems to have goofed)
0 stars 0 forks source link

Tank turret rotation bug #14

Closed nbenven95 closed 5 years ago

nbenven95 commented 5 years ago

The tank turret does not allow for full 360 degree rotation. When rotating to a certain point, the turret resets itself and rotates all the way around in the other direction.

nbenven95 commented 5 years ago

Addressed in lecture 238. Issue was that the yaw angle being passed to Turret->Rotate in RotateTurretTowards was sometimes >= 180 degrees. To mitigate this, the turret just rotates in the opposite direction if the yaw angle is >= 180.