• 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 underdog1515 · Nov 06, 2014 at 04:00 PM · camera2dmovementspritelerp

2D Sprite leaves a trail when moving diagonally

Hello! Sorry for my poor English!

My problem: I'm trying to diagonally move some object with large speed. Move script taken from this tutorial. Quote from it:

 Vector3 target = moveDirection * moveSpeed + currentPosition;
 transform.position = Vector3.Lerp( currentPosition, target, Time.deltaTime );

My example sprite is: sprite

And i got move effect like this: trail effect

I can't even catch it on a screenshot, so i forged it in Paint:) This occurs in build for PC with any quality settings (but not in Unity Editor!) and also on Android Tablet. When I slow down move speed in script movement is fine perfect, there no blinks and trails, but it's not acceptable for me. When I move object straight, not diagonally. It's better, but not good either. In the project from tutorial I can set any speed and there is no such effect. I tried different options of sprite's import (filter mode - point, bilinear, pixels per units and so on), but no luck, bc I don't actually understand what i'm doing.

Help me please. Thanks!

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 raitkxel · Feb 11, 2015 at 02:28 AM

Hey brother! I was also facing same problem and com up with a solution. Simply set your 2d camera clear flags value to Solid color or to sky box OR ues a screen background with no alpha channel.

I think problem is when sprites render on some area with alpha channel they render themselves evey frame as mentioned in unity docs. So there should be some non alpha thing (either camera background or some screen full background image) behind sprites.

Hope that helps. Thank you

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

[2D] Camera movement causes flickering/jittering sprites 2 Answers

Moving 2D sprite along a path 0 Answers

Sprite flip movement script not working! HELP! 0 Answers

2D Character Sprite in Corner 2 Answers

Move A Camera Between Two Points Smoothly 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