playMaker

Author Topic: Lines on sprite edges with different camera view?  (Read 4872 times)

DaPixelWizard

  • Playmaker Newbie
  • *
  • Posts: 7
Lines on sprite edges with different camera view?
« on: May 09, 2015, 07:37:14 PM »
So I'm new to Unity, and the programming part to game development in general. Anyway I'm trying to make a 2d tile based game. When I first started adding tiles, I realized that there were lines appearing on sprite edges depending on where you were looking at it from. I looked into this online and found out that it could be fixed by applying a shader to the sprites. I did this and it fixed the issue. Since then though, I added a "Smooth Follow Action" fsm to the camera. I like the movement of the camera, but now the edges are back on the sprites. What do I do to fix this?

Harvid

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Lines on sprite edges with different camera view?
« Reply #1 on: May 09, 2015, 09:14:26 PM »
Its is the bitrate of your image, without alpha channel

DaPixelWizard

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Lines on sprite edges with different camera view?
« Reply #2 on: May 09, 2015, 10:58:44 PM »
Its is the bitrate of your image, without alpha channel

What?

TheBadFeeling

  • Junior Playmaker
  • **
  • Posts: 66
Re: Lines on sprite edges with different camera view?
« Reply #3 on: May 10, 2015, 08:35:36 AM »
You probably haven't cleared the background of your image properly, so the edges of the image isn't 100% transparent.
Open your image in your image editing program and delete the edges of your sprite-area. Also, in Unity's sprite editor -- make sure that the boundaries of your sprite doesn't touch any surrounding pixels (especially important if your image is resampled at runtime -- down from 2048 to 1024 for instance).

/Bad
The Force is with you, young Playmaker – but you are not a C# senpai yet.

Harvid

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Lines on sprite edges with different camera view?
« Reply #4 on: May 10, 2015, 09:39:15 AM »
Wher ar you seen the white Artifact around the "Cut out area / character" or around the entire sprite/square ?

DaPixelWizard

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Lines on sprite edges with different camera view?
« Reply #5 on: May 10, 2015, 09:52:01 AM »
Wher ar you seen the white Artifact around the "Cut out area / character" or around the entire sprite/square ?

The entire square. I fixed it by putting the default sprite shader on it and enabling "pixel snap" but when I use this camera following thing, it stops working.

Harvid

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Lines on sprite edges with different camera view?
« Reply #6 on: May 10, 2015, 10:07:30 AM »
Could you upload an image of your problem ?
Try to use the Sprite Editor in unity http://docs.unity3d.com/Manual/SpriteEditor.html