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"

Child Turret Rotation Problem

Hello. I am creating turrets that are child actor components of a large ship, and I rotate the yaw of the body of the turrets to face the target (the barrels then do pitch).

The problem is, if the parent ship rolls or pitches, the turret will not follow because I am setting it's world rotation.

I can not set the pitch and roll world rotation to that of the parents at the same time as I do the yaw, because the yaw changes what the pitch is (IE it'll be rotated differently than the parent so pitch rotates it in different direction than the pitch of the larger ship)

I've tried many ways around this but can't seem to solve the issue.

Any suggestions?alt text

Product Version: UE 4.12
snip.jpg (110.1 kB)
more ▼

asked Aug 25 '16 at 01:55 AM in Blueprint Scripting

avatar image

148 13 18 31

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

1 answer: sort voted first

Hey Pinworm,

Here is a download to a project I put together that shows how to setup some turrets on a ship that will face a enemy and shoot a projectile at it.


more ▼

answered Aug 25 '16 at 03:47 PM

avatar image

ImVawx ♦♦ STAFF
6.8k 114 18 128

avatar image Pinworm Aug 25 '16 at 06:43 PM

Thanks, but unfortunately this method didn't work for me. I had the same problem. Presumably, because I have my ship mesh as the root, and you have a scene component as the root.. I believe that's the issue.

Can I not do this while keeping my ship mesh as the root? That would be highly preferable, I'd have to do a lot of mucking about otherwise.

Thanks again, hopefully I can do some math to simply alter the turrets pitch, using the parents pitch, instead of the turrets pitch.. if that makes sense. There's got to be a simple way to do this.

Edit: Nevermind, the issue was you don't edit the "TurretBody" Rotation at all. I need to edit it's yaw but maintain the pitch and roll of the parent. I don't know how to get that relative information

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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