The Daily Click ::. Forums ::. Klik Coding Help ::. Problem with smooth scrolling
 

Post Reply  Post Oekaki 
 

Posted By Message

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
12th November, 2009 at 18:14:52 -

The problem is as you get the furthest point away from the camera the whole screen jerks about 1 pixel and keeps doing that. If you dont go full speed the camera works perfectly.

Im useing a camera object that moves at a division of the difference between the camera and the player.
Like: (cameraPos - playerPos)/10

It works on a fast loop. If its position is different to the player it does that formula up there in a alt value ^, and then the fast loop starts because its alterable value has been changed (the loop loops the amount of the alterable value)
And then on the loop it pushes the camera 1 pixel in that direction.

Im not good at explaining things like this so i have a uber commented file for you to take a look at.
Help is much appreciated

http://www.zephni.com/downloads/zephniscrolling.rar

 
dont make me divide by zero...

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
12th November, 2009 at 19:45:45 -

Its alright i sorted it

 
dont make me divide by zero...
   

Post Reply



 



Advertisement

Worth A Click