- Home /
Display Diced into Sections While Moving Fix?
Problem:
The display is "Diced" into slices when the objects in the viewport are in motion.
Background:
This is in the Editor (Which I was surprised by, since it usually looks better). When run on an iPhone the display is not smooth, although it isn't diced. Nearly all of the textures in the game are sprites so the graphical overhead is very small.
What is not a problem:
The framerate is not a problem, as far as I can tell. It runs solidly at 60fps on iPhone. After some significant sprite optimization.
Question: What could be the problem with it? Is it a graphics problem, or something I am not aware of, some setting perhaps?
Screenshots did not show the diced appearance, looking perfectly normal, not sure why this would be. So, I made a concept of what it looks like in the image below:
Also, here is the code I am using to move the objects if that could somehow have anything to do with it. Although I doubt it very much. I previously used iTween, before writing my own (simpler) code to move the transform myself. (However, using iTween had the exact same issue, which is why I don't think it is a scripting problem.)
Vector3 startPos;
Vector3 toPos;
GameObject target;
float timeStart;
float timeTo;
bool moveTo = false;
void Update ()
{
if(moveTo)
ActuallyMoveTo();
}
// This is called from another section much like iTween
void MoveTo(GameObject tar, Vector3 pos, float time)
{
startPos = tar.transform.position;
toPos = pos;
target = tar;
timeStart = Time.time;
timeTo = time;
moveTo = true;
}
// This actually sets the transform position
void ActuallyMoveTo()
{
if(target.transform.position == toPos)
{
moveTo = false;
}
else
{
float timeCurrent = ((Time.time - timeStart) / timeTo);
target.transform.position = Vector3.Lerp(startPos, toPos, timeCurrent);
}
}
Your answer
