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"

Rotating an object relative to an axis.

Hey everyone!

Sorry to bother you guys with this, but my brain is fried and I could use some help!

I'm working on a project that has a clockface that is angled up at a 45 degree angle and facing about 15 degrees to the left (if facing the object from 0,0,0).

The watch has hands that need to rotate relative to time and I'd prefer to have all hands moving as a real watch would (minute, hour hand slightly increment yaw rotation until the time is reached).

Normally I don't think this would be an issue (I already have the logic to rotate the hands in a normal scenario working), but the the watch was transformed in the 3D modelling tool and not exported at transform 0,0,0, so trying to rotate the Y axis makes X and Z go all wonky.

I was wondering if there was some UE4 magic (or just some basic trig) that I could use to add the proper X and Z rotation to the hands of the clock so that I can set the rotation of the Y axis relative to 0,0,0 without having to request that the model be resent to me or having to fix it myself as I don't want to make my client wait too much longer.

Thanks again for all of the help!

Product Version: UE 4.19
Tags:
more ▼

asked Sep 14 '18 at 02:45 AM in Blueprint Scripting

avatar image

F_Innovations
59 3 3 6

avatar image ThompsonN13 Sep 14 '18 at 04:38 AM

you make it sound like when the mesh was exported it had a random rotation. if thats the case then you really should fix its rotation so you have the face along an axis, then you can set the rotation of the actor in ue4. you could also just change the import rotation and reimport so you dont have to take the mesh to a modeling program.

once your clock face is aligned to a axis its easy work to get hand component and set relative rotation. actually you may be able to play with the parenting of the clock and hands to get it to work no matter the rotation, though it may depend on the origin location of the clock.

but yea there should be some ways to accomplish your goal. good luck.

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

1 answer: sort voted first

As ThompsonN13 said it's going to be best to fix the rotation. I've tried re-parenting the meshes to anchors to try and get an axis that I can work with, but the import rotation is too random to make any sort of smooth calculations without hacking the current setup apart.

Thank you for the input!

more ▼

answered Sep 14 '18 at 10:11 PM

avatar image

F_Innovations
59 3 3 6

(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