Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 vipydevelopment · Jan 04, 2018 at 10:50 AM · smoothblurblurrysmoothfollowpassing

Everything in the scene except the player looks blurry when the camera is moving | Unity2D

I started off my game using a simple camera follow script which only followed my player on the x axis with an offset and and some restrictions

I recorded a video on my android to show what I mean. In the recording the issue is a bit exaggerated ( due to recording) and only viewable once the spikes enter the view. When not recording, the player animation is perfectly smooth. Here's the video

 using UnityEngine;
 
 public class MainCamera : MonoBehaviour {
 
     public Transform target;
     public float xOffset, xPosRestrictionMin, xPosRestrictionMax;
 
     private float yPos, zPos;
 
     void Start ()
     {
         yPos = transform.position.y;
         zPos = transform.position.z;
     }
     
     void LateUpdate ()
     {
         transform.position = new Vector3(Mathf.Clamp(target.position.x + xOffset, xPosRestrictionMin, xPosRestrictionMax), yPos, zPos);
     }
 }
 

However when first running the game everything looked "jittery". Despite all my player physics being inside fixed update, input inside update and camera updates being inside lateupdate. I tried setting interpolate to extrapolate on the players rigidbody2d. Now the player would look and animate smoothly but everything else look blurry when the camera is moving. I thought that maybe my script or settings were at fault so I tried to turn off vsync, set target frame rate to 60 and when nothing worked I downloaded Cinemachine. Even with cinemachine instead of my own script it still looks blurry and I can't figure out why. Here's a simplified version of my controls.

 private void Update()
 {
     //Handle touch input
     if (Input.touchCount > 0)
     {
 
         foreach (Touch touch in Input.touches)
         {
             switch (touch.phase)
             {
                 // Touchdown
                 case TouchPhase.Began:
                     if (onGround || !doubleJumped)
                     {
                         jump = true;
                         touchReleased = false;
 
                         if (onGround)
                             anim.SetBool("jump", true);
                     }
                     break;
 
                 //Touch up
                 case TouchPhase.Ended:
                     allowGlide = false;
                     anim.SetBool("glide", false);
                     if (rb.velocity.y > 0)
                         touchReleased = true;
                     break;
             }
             
         }
     }
 }
 
 
 void FixedUpdate()
 {
     rb.velocity = new Vector2(newMoveSpeed, rb.velocity.y);
 
     onGround = Physics2D.OverlapCircle(groundCheck.position, groundCheckRadius, whatIsGround);
     if (onGround && !jump)
     {
         gliding = false;
         allowGlide = false;
         anim.SetBool("glide", false);
         anim.SetBool("jump", false);
         doubleJumped = false;
     }
 
     //Slowly Accelerate if not at top speed and touching the ground
     if (newMoveSpeed < moveSpeed && onGround)
         newMoveSpeed += 0.0165f;
     anim.speed = Mathf.Clamp(newMoveSpeed, 13, 18);
 
     //Jumping 
     if (jump && onGround)
     {
         jump = false;
         rb.velocity = new Vector2(rb.velocity.x, jumpHeight);
     }
     else if (jump && !doubleJumped && !onGround)
     {
         jump = false;
         doubleJumped = true;
         allowGlide = true;
         rb.velocity = new Vector2(rb.velocity.x, jumpHeight);
     }
 
     //Add multiplier if falling down
     if (rb.velocity.y < 0 && allowGlide)
     {
         anim.SetBool("glide", true);
         if (!gliding)
         {
             rb.velocity -= Vector2.up * Physics2D.gravity.y;
             gliding = true;
         }
         else
         {
             rb.velocity += Vector2.up * Physics2D.gravity.y * (glideMultiplier - 1) * Time.deltaTime;
         }
     }
     else if (rb.velocity.y < 0)
     {
         rb.velocity += Vector2.up * Physics2D.gravity.y * (fallMultiplier - 1) * Time.deltaTime;
     }
 
     //Increase fall multiplier if touch is released mid jump
     else if (rb.velocity.y > 0 && touchReleased)
     {
         rb.velocity += Vector2.up * Physics2D.gravity.y * (lowJumpMultiplier - 1) * Time.deltaTime;
     }
     else if (rb.velocity.y == 0)
     {
         return;
     }
 }



Thanks, any help and feedback is appreciated!

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
Best Answer

Answer by vipydevelopment · Jan 05, 2018 at 12:09 AM

Tried to reset all quality and player settings, then setting the default android quality to ultra. It fixed my issue.

Comment
Add comment · 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

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

121 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 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

1080p and horrible blurry elements 1 Answer

How to make camera follow player from point to point 2 Answers

Accelerate float rather than decelerate with Mathf.SmoothDamp 0 Answers

Convert Blur Shader to work with UniversalRP 0 Answers

Why my pixel sprites look blurry? 0 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