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"

Rotate an actor random degress on overlap

Hi everyone

I am really struggling with creating an actor blueprint for a random rotation in values of 36 degrees. For example, the character steps into a box trigger which triggers the the actor to rotate in a random rotation of 36 degree increments, all the way up to 360 degrees.

Can anyone help at all, please?

Product Version: UE 4.8
more ▼

asked Sep 10 '15 at 08:12 PM in Blueprint Scripting

avatar image

3 1 2 3

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

1 answer: sort voted first

Multiply 36 with a random value from 1 to 10(Random Int in Range) and add it to actor rotation when the actor overlaps the trigger?

more ▼

answered Sep 10 '15 at 08:15 PM

avatar image

16.8k 671 167 677

avatar image anthonywalch83 Sep 12 '15 at 10:39 AM

alt text

Hi, thanks for the quick reply!

I've attempted to follow but I'm obviously going wrong somewhere. Do you have a blueprint screenshot example how it should look?

rotationtrigger.jpg (151.1 kB)
avatar image Jacky Sep 12 '15 at 11:02 AM

Remove that ADD array node and use an Add Actor Rotation function instead of Set Actor Rotation. Right click on rotation value and Split Struct so that you can access the direction you want to rotate the actor. Plug your multiply result to the axis you like and that's it. Here is a screenshot:

alt text

rotate.jpg (60.8 kB)
avatar image anthonywalch83 Sep 12 '15 at 12:54 PM

Superstar!! Thank you so much!

(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