Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by Bennyboy50z · Feb 16, 2014 at 06:04 AM · 2derrormovementcharactercharactercontroller

Background & sprites are smearing towards the player during movement. Help determine the cause and solution?

Hi There! So I'm having a problem with character movement and my background. The background appears to be smearing(smudging) slightly in the direction of the character as it moves which looks really hard on the eyes. I have no idea what is really causing this but it might be the way I am moving the character.

I'm wondering what is causing this strange smearing movement effect and how I can fix it. Please keep the explanation noob-friendly for me and thank you very much in advance!

So here are the details:

  • The game is 2D and the player is constantly running in one direction and can jump.

  • I can't get a screenshot of the effect (So maybe its my eyes or my
    computer?) but you can clearly see it when playing. Here is a link to the project so you can see what I am talking about yourself if my details don't help explain the effect. You will notice on the mountain tips and the clouds as you pass them. https://sites.google.com/site/benprojects50z/home/the-recycler-2d

  • The effect makes it look like parts of the background sprites (ex. mountain/clouds) smear(smudge) towards the player temporarily as he hops/walks by.

  • The camera is orthographic and is a child of the player.

  • The character uses the Unity character controller and has no rigidbody.

  • The character moves using the character motor and this script:

     var moveSpeed : float = 10; 
         var jumpSpeed : float = 25;
         var dead : float = 0.01;
         var player : GameObject;
         var anim : Animator;
         var gameOver = false;
         var countDownStyle : GUIStyle;
         var jump: AudioClip;
         var playerDead : AudioClip;
         
         private var moveDirection : Vector3 = Vector3.zero;
         private var motor : CharacterMotor;
         
         function Awake () {
         motor = GetComponent(CharacterMotor);
         }
         
         function Start(){
         anim = gameObject.GetComponent(Animator);
         }
         
         function FixedUpdate () {
         if (RecyclerStartLevel.startG){
             var controller : CharacterController = GetComponent(CharacterController);
             controller.Move(Vector3.right * (moveSpeed) * Time.fixedDeltaTime);
             anim.SetFloat("Speed",moveSpeed);
         
             motor.inputJump = Input.GetButton("Jump");
         
         if (Input.GetKeyDown("space")){
             audio.PlayOneShot (jump);
             anim.SetFloat("Speed",jumpSpeed);
             
         }
         }
         }
    
    

EDIT 1 This is an edited screenshot to show you what I'm pretty much seeing. http://i.imgur.com/9g79fRZ.png?1?8650

EDIT 2 So apparently the effect is only on my computer so I'll just have to see if I can change the scene setup I guess to make a work-around.

Comment
Add comment · Show 4
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 Eric5h5 · Feb 16, 2014 at 06:16 AM 0
Share

I don't see any smear effect. You should turn on vsync though. Also don't use FixedUpdate; that's only for physics and will randomly fail for input such as Get$$anonymous$$eyDown (since that's only true for the single frame when the key is down which may well not be during a physics update).

avatar image Bennyboy50z · Feb 16, 2014 at 06:48 AM 0
Share

Thanks for looking into it! I'm not sure if VSync was on when I uploaded it to the site, but I've been fiddling around and Vsync is currently set to EveryVBlank so I presume that means its on now?

Also if I use Update ins$$anonymous$$d of FixedUpdate the jumping gets a bit jittery. I will look into avoiding its use when not using physics though and when to properly use it, I didn't know it caused Get$$anonymous$$eyDown to fail, Thanks!

I'm still having the problem though. It looks like somebody is using the motion blur effect from Gimp/Photoshop or smudging parts of the sprite as you jump by on my screen.

I'm not sure if I should be responding to this as an update in the question or as this comment.

avatar image Eric5h5 · Feb 16, 2014 at 09:16 AM 0
Share

Definitely don't see anything like that...I would assume it's something to do with your specific computer and/or graphics card and/or monitor.

avatar image Bennyboy50z · Feb 16, 2014 at 07:12 PM 0
Share

Thank you! It definitely is my computer. I just tried it out on an older PC and the effect was not there. I also turned on Vsync, and stopped using FixedUpdate for the controller and that fixed a few problems. Thanks again, if you decide to post as an answer I'll be sure to 1+ it or accept it or whatnot!

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

19 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

Related Questions

Character Controller problem 0 Answers

Non-symmetrical Character walk left animation. 0 Answers

Making my 2d character's arm follow the mouse, scrpit not working, please help :c 1 Answer

How to make my character stop stuttering when walking down a slope? 2 Answers

CharacterController NullReferenceException dispite attached to object 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