Camera not moving right?

I'm trying to make a basic platformer game. However, in an EnterFrame event, it checks if the player's x is above a certain value, and then calls the move function on the levelmap. However, it's not moving the map right. Here's a link to my code: http://db.tt/IqClXNp

Also, is it better to make my tiles physical with the HasBody and bodyType = static properties and then not have to worry about physical stuff, or to make objects which require a Body type and bodyType = static? I think in the long run after designing 20 levels having the tiles all physical would be easier, but idk.

I think I have fixed your camera problem by adding the following code to the end of your object listener function onObject:

1
2
        local layerGroup = map:getLayer("Platforms").group
        layerGroup:insert(player)

Sweet, that solved it, thanks GrahamRanson!

Awesome, glad it is working.

views:1457 update:2011/10/13 16:39:51
corona forums © 2003-2011