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"

Orienting an object to look at target based on an up vector?

Hi there,

I'm struggling a bit with this problem and I was wondering if you could point me loosely in the right direction. I couldn't really find anything in any UE4 tutorials or books that might help.

Using the Look at Rotation function, I am able to make a turret face a player - and by scrubbing roll, I can ensure the turret gimballs correctly based on a world up vector. So far so good.

The turret itself is composed of a base (the U shaped assembly) and the gunner assembly. The base rotates and the upper half rotates and pitches, so they always stay aligned and my model is based on this: https://www.youtube.com/watch?v=w4PXou0aGiE

Given that I'd really like to spawn this turret on a placement on an object which could have variable orientation (like a ship or large moving vehicle or even an airship or something)... I understand why this doesn't work, because this is all world-axis information and these are not world-oriented object.

I'm really left scratching my head with this problem.

alt text alt text alt text

Product Version: UE 4.17
Tags:
more ▼

asked Aug 27 '17 at 09:50 AM in Blueprint Scripting

avatar image

Osakanone
23 1 5 8

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

1 answer: sort voted first

You can get the LookAtRotation, and CombineRotators with a 90 degree forward rotation. The order of the inputs for the CombineRotators will matter, try both ways to make sure you get the right one.

more ▼

answered Aug 27 '17 at 11:26 PM

avatar image

BenVlodgi
2.1k 38 17 52

(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