ParallaxEnabled and PhysicsEditor

Hello,

I just started using Lime and now I have some problems. Maybe someone can help me :wink:

  1. I’ve build a map with ParallaxEnabled (also set the parallaxBase). If I want to use the PhysicsEditor and add the physics shape to the map, the shape is set to the wrong position. Also it moves when dragging the map. Can this be prevented?

[lua]-- Add physics objects created in PhysicsEditor
local physicsData = (require “level1”).physicsData()
physics.addBody(map.world, “static”, physicsData:get(“level1”))
– See physics objects, for debugging purposes
physics.setDrawMode(“hybrid”)[/lua]

  1. If I remove the ParallaxEnabled property from Tiled, I can not set the position of the map anymore. I removed all parallax properties from Tiled. This is very strange. Don’t have any clue. I set it like that:

[lua]map:setPosition(0, 500)[/lua]

I can set the position if parallax is enabled :frowning:

Maybe someone has an idea.

Thx. [import]uid: 56928 topic_id: 10971 reply_id: 310971[/import]

I don’t know if you’ve seen it or not but going through this tutorial should help - http://justaddli.me/tutorial.php?t=0&id=16 [import]uid: 5833 topic_id: 10971 reply_id: 39927[/import]

Thank you, but I did it with this tutorial, using my own map. I’ve checked every setting more then once and couldn’t find it.

Something has to be wrong with the map. [import]uid: 56928 topic_id: 10971 reply_id: 39929[/import]

What layer are you adding physics too? In the parallax maps you will only want to add physics to a single layer otherwise things will go wrong. [import]uid: 5833 topic_id: 10971 reply_id: 39932[/import]

I rebuild my map from ground up an now it works, but there is another problem.

If I put this code in my main.lua, the physics behaves very strange. For example if I drag the map down, the dynamic tiles move up and float in the air. Sometimes the tiles go even though the stativ bodys (built in PhysicsEditor).

[lua]local onTouch = function(event)
map:drag(event)
end

Runtime:addEventListener(“touch”, onTouch)
[lua]I can also provide a sample if needed.

Thx :wink: [import]uid: 56928 topic_id: 10971 reply_id: 40011[/import]

Hi, could you please send a sample to support@justaddli.me and I will take a look at it. Thanks! [import]uid: 5833 topic_id: 10971 reply_id: 40090[/import]