Turning a turrets weapons, pitch problems
So I'm trying to make an automated AA-turret at the moment to shoot people out of the air in my flying game. Just a simple model right now for blueprinting, but capable of accurately estimating the style i want to go for:
Now what i want to happen is that when a Target is spotted by the turret, the main turret will rotate towards the target(yaw) while only the turrets weapons(the gunz, as it were) rotate on pitch too(so very similiar to many real life AA).
So the target acquisition works so far. The TurretMain will rotate towards the Target just fine via this logic:
Now here is where I am having problems. I tried this logic in order to then rotate the TurretGunz:
As you can see the gunz are parented to main, i take the pitch that was calculated from main, clamp it from -10 to 80 and then pass it off to the gunz' rotator. And then nothing happens, meaning the gunz will rotate around with the main just perfectly, but will stay at their default pitch rotaion. Which is funny, because when i disconnected the yaw input to gunz it would disable the gunz yaw rotation as one would expect, implying that the logic itself should work. however the pitch does not.
I also tried plugging the calculated pitch value directly into the makeRotator for TurretMain, and alas the entire turret rotated towards the target as expected, meaning that the actual pitch value is being correctly calculated.
This lets me assume that the problem somehow lies with "AimGunzAtTurret" part of my blueprint, but as a novice at blueprints and UE4 i just can't figure out why :(
Any Help is greatly appreciated, what am i missing here?
asked Apr 13 '16 at 03:19 PM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here