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. 

Linking Time with Day/Night Cycle

So I've been working on a day/night cycle as well as a proper clock. I want to hook up the Day/Night Cycle and Time to work together, so that every 24 hours a full day/night cycle will have been completed, but i'm unsure how to properly go about this. Right now, the only thing I have going is the Day/Night Cycle being advanced by the time (moves every millisecond), but I can't figure out how I should properly link up the time so that what I said could be done.

TL;DR: Want to make it so that every 24 hours a day/night cycle is complete

EDIT: Maybe I can simplify (or maybe this makes it worse) a bit more. I advance the sun's position every second. There's 86400 seconds per day. So I would want to go through a full 360 degree rotation every 86400 seconds, but im unsure how to do so.

EDIT2: Still thinking about it. I think part of the problem I figured out is that currently it adds to the sun's rotation every tick instead of every second. How would I change it to every second instead?

Here's the BP of the Day/Night Cycle and Timer at it's current state alt text alt text

Product Version: UE 4.14
Tags:
more ▼

asked Jul 15 '17 at 01:41 AM in Blueprint Scripting

avatar image

SgtFlexxx
7 3 7 10

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

1 answer: sort voted first

I think I solved my problem for the most part. I added a delay so that the ticks aren't the ones dictating how often the sun's rotation is being changed. I however am only able to update the sun's position every tenth of a second instead of every hundredth of a second (as trying to update every millisecond results in timings being off), but I think the results I got are more than satisfactory. I only wish I were able to set the position of the sun using the time float, but I'll have to figure it out some other way.

Here's my level BP after adjustments

alt text alt text

more ▼

answered Jul 15 '17 at 04:40 AM

avatar image

SgtFlexxx
7 3 7 10

(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