I didn't go too deep into you code, but you shouldn't need to transform the coordinates for drawing; just draw the sprite at object.x, object.y.Rishavs wrote:I need some help with camera coordinates.
camera:worldCoords() is only needed to figure out where some point on the screen (between 0,0 and width/height of the window) is in the game world. It is used, for example, to figure out where the mouse pointer points to in the game world.
Conversly, camera:cameraCoords() maps a point in the game world to coordinate in the game window.
Looks like you execute Timer.script every frame (if you don't, please post the whole file). You need to call it only once, which defines the script. The script is updated every time you call Timer.update().Kibita wrote:I dont know what's going on with my Timer, it should make my obstacles doing a smooth oscillation in the X axis, but they go crazy, oscillating very fast gradually.