Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Puzzer · Jan 16, 2017 at 03:50 AM · daycycle

Switching from light to another still keeps area with old light

Okay so here is my deal (don't know if this will even be seen, but oh well), I am currently working on a game were there is a day and night cycle. Where ever I start with the day or night, that will be baked in already. To clarify even more, when I start in the day and night comes around, everything is still light up except the ground; Night will be dark if started that way but the day will still be dark. Is there something I need to do with my script or in unity. Thanks for the help in advanced, sorry if this is a dumb question I am a semi beginner with it.

Here is the problem in the picture: alt text

Edit: here is my script. var cyclemins : float; var cyclecalc : float'

 cyclemins = 2;
 cyclecalc = 0.1/cyclemins *-1;
 
 function Update () {
     transform.Rotate(0, 0, cyclecalc, Space.World);
 }


problem.png (356.8 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by TheyLeftMe4Dead · Jan 16, 2017 at 04:30 AM

I don't know what your script does right now so it's difficult to tell you what to fix. I don't know a lot about lighting but from your description, you are using two different light sources for your night/day cycle. Assuming there is a horizon and moving sun/moon, I would make it so that when the sun is under the horizon (not visible) that the sun light source object would be destroyed. And the same for the moon. You should check out the beginning of Brakey's youtube roll-a-ball series to learn about lighting a bit more. That's how I did.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Puzzer · Jan 16, 2017 at 04:36 AM 0
Share

Alright thank you. I will see if that will fix it after watching the videos. Here is the code if you are interested. Just something simple

var cycle$$anonymous$$s : float; var cyclecalc : float; cycle$$anonymous$$s = 0.25; cyclecalc = 0.1/cycle$$anonymous$$s *-1; function Update () { %|1201387804_1|% }

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

87 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Spin wheel once a day 1 Answer

How to change day & time in 12hr that moves when pressing a button 0 Answers

Is it possible to transition LUT over time 0 Answers

How do you make a day/night cycle in unity 2d? 0 Answers

Counting Days Using In-Game Time System? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges