x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Turning a turrets weapons, pitch problems

Hello everyone!

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:

alt text

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: alt text

Now here is where I am having problems. I tried this logic in order to then rotate the TurretGunz: alt text

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?

Paaatreeeck

Product Version: UE 4.11
Tags:
turret.png (609.9 kB)
turnturret.png (325.8 kB)
turngunz.png (267.8 kB)
more ▼

asked Apr 13 '16 at 03:19 PM in Blueprint Scripting

avatar image

Paaatreeeck
6 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question