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. 

Time based Sun Rotation

Hello, I am trying to get a time-based sun rotation. Which means I have a time variable which increases every second (in game second not real second). Now I want to rotate my light sources according to this variable. Since I do not come to any solution, I decide to ask this question here.

Product Version: UE 4.15
Tags:
more ▼

asked Mar 11 '17 at 03:29 PM in Blueprint Scripting

avatar image

NiklasZeroZero
80 9 8 16

avatar image Deathstick Mar 11 '17 at 07:31 PM

I would recommend instead creating a timeline node, and within that timeline add a vector variable. Use the vector to set your rotations across the 3 axis according to the timeline. Then break the vector variable from the timeline node and connect x,y,z into a make rotator node, which feeds into SetWorldRotation.

Just have the Update exec pin from the timeline go into the SetWorldRotation node and it will correctly update the rotation according to the timeline.

Timelines are great, as you can set the length of the timeline along with multiple variables such as a float for SunIntensity.

You can also use SetPlayRate to alter the duration of the timeline without altering the timeline itself. So if you made your timeline take 10 seconds to complete, a SetPlayRate of 0.5 would take 20 seconds, 2 would take 5 seconds.

You can also use the SetNewTime on the timeline node in order to teleport the timeline to the set float duration if you say, wanted to start in the afternoon or warp to daytime after "sleeping."

avatar image NiklasZeroZero Mar 13 '17 at 05:34 PM

That helped me. Thanks!

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

1 answer: sort voted first

As Deathstick say:

I would recommend instead creating a timeline node, and within that timeline add a vector variable. Use the vector to set your rotations across the 3 axis according to the timeline. Then break the vector variable from the timeline node and connect x,y,z into a make rotator node, which feeds into SetWorldRotation.Just have the Update exec pin from the timeline go into the SetWorldRotation node and it will correctly update the rotation according to the timeline.Timelines are great, as you can set the length of the timeline along with multiple variables such as a float for SunIntensity.You can also use SetPlayRate to alter the duration of the timeline without altering the timeline itself. So if you made your timeline take 10 seconds to complete, a SetPlayRate of 0.5 would take 20 seconds, 2 would take 5 seconds.You can also use the SetNewTime on the timeline node in order to teleport the timeline to the set float duration if you say, wanted to start in the afternoon or warp to daytime after "sleeping."

more ▼

answered Apr 09 '17 at 06:55 PM

avatar image

NiklasZeroZero
80 9 8 16

(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