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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

C++: How to point a mesh into s specific direction using all 3 rotation axis ?

C++: How to point a mesh into s specific direction using all 3 rotation axis ?

Hi,

i am totally new to UE4 C++, so sorry for asking noob questions...

I am trying to make a Radar-Antenna animation in C++..

What i managed to archive so far:

  1. Placing an actor with a mesh in the UE4 Editor

  2. Manipulate the actor with C++ Code, changing Position with a Vectors work fine.

  3. Rotate the mesh using the FRotator.ROLL in the Ticker works fine too... I get a rotating mesh in the right place so far.

  4. At least i want to make the antenna sway up and down using the pitch rotation. That code gives me a weird reaction, so the antenna pitches up and down fine while starting, at 90 mesh degree roll it only twists itself.

I think, that the base orientation of the Pitch-Axis is not changing with the mesh is rotating around the rolling axis, it always refers to the spwan position of the actor

Is there a solution, to have the y-axis always depend on the poition of the x-axis, i.e. rotate it with any rotation input ?

Product Version: UE 4.12
Tags:
more ▼

asked Jul 21 '16 at 12:59 PM in C++ Programming

avatar image

head2003
2 1 3 5

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

2 answers: sort voted first

Try to use this :)

 FRotator Rotation = UKismetMathLibrary::FindLookAtRotation(Start, LookAtPoint);
more ▼

answered Jul 21 '16 at 01:02 PM

avatar image

NymKappa
692 31 20 54

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

Thanks, this works for me.

more ▼

answered Jul 22 '16 at 09:24 PM

avatar image

head2003
2 1 3 5

(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