x


Scroll camera smoothly vertical

I'm currently making a vertical tilebased 2D scroller using Sprite Manager. I've been told that rather then moving each tile to scroll I should scroll the camera instead and attach tiles when needed.

Currently I'm scrolling using the following method

private float gameSpeed = 5f;
private float moveAmount = 0;

void Update () 
{
    moveAmount = gameSpeed * Time.deltaTime;
    gameCamera.transform.Translate(Vector3.up * moveAmount);
}

Sometimes I can see jitter in the scrolling. I what wondering what would be the best way to do this. Im not sure if the jittering is the camera movement of sprite manager though but the fps seems fine.

more ▼

asked Jul 13 '11 at 01:08 AM

.hooligan gravatar image

.hooligan
257 46 49 57

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3132
x56

asked: Jul 13 '11 at 01:08 AM

Seen: 747 times

Last Updated: Jul 13 '11 at 01:08 AM