Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 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 /
avatar image
0
Question by serenefox · May 17, 2014 at 04:50 PM · materialuvoffsetscrollingjitter

Getting rid of Scrolling Uv Jitters

Hello,

I have a plane in the background of my game and I have a script for material offset attached to it. It works great but the jitter gives me a headache and I am sure that's not good for people playing it as well. Its just a slight jitter but it is noticeable enough. I was wondering if anyone had any answers as to why this is happening. I tried using deltaTime instead of Time.time but the background just jumps then doesn't move. I also tried setting a consistent frame rate but none of this changed it.

Here is the code I have:

 using UnityEngine;
 using System.Collections;
 
 public class BackGroundScroll : MonoBehaviour {
     
     public static float BGscrollSpeed = -0.5f;
     
     void Update () 
     {
         renderer.material.mainTextureOffset = new Vector2 (0, (Time.time * BGscrollSpeed % 1));
     }
 }


Thanks for the help in advance!

Comment
Add comment · Show 5
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 serenefox · May 18, 2014 at 09:36 PM 0
Share

But i need it to endlessly scroll, and that keeps the UVs in the 0-1 range.

avatar image Eric5h5 · May 19, 2014 at 04:22 AM 0
Share

Don't remove the modulo. There's nothing in that script that would cause any jitters.

avatar image serenefox · May 19, 2014 at 06:30 AM 0
Share

Thanks Eric and I was afraid of that haha, ok I will have to look into another area then. It's just when the background moves up the screen its almost like it is flashing slightly around some of the clouds I have on the plane(BG) and i don't want anyone to have a seizure or something.

avatar image AlucardJay · May 19, 2014 at 09:45 AM 0
Share

removed comment. Couldn't see anything that would cause jitter so suggested that. Jitter is probably caused because of fast scrolling speed.

avatar image serenefox · May 19, 2014 at 07:11 PM 0
Share

Thats what I started thinking but it does need to move at that speed because any slower it just doesn't look right. Thanks for your responses. I might just have to submit the game as is to apple and see if it gets rejected for that. I haven't had anyone complain about it but i haven't had many testers either. I might just be over thinking it.

0 Replies

· Add your reply
  • Sort: 

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

22 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

Related Questions

Material offset relative to other game object 0 Answers

Initialize UV offset with UV scrolling script 1 Answer

Problem with using offset for scrolling screen 0 Answers

Using Rpg maker XP Tiles (2D Tile System) 2 Answers

Translate World transform data to UV offset 2 Answers


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