Lime and Parallaxing

Hi All,

I am trying to add parallax scrolling to my level. It’s scrolling on the Y axis. But as soon as I set the ParallaxEnabled parameter to true in the Map properties. The level becomes completely grey when I try to scroll it. First I had set up the layers with parallaxFactorY settings and a base layer. But I removed the parameters one by one to test where something might go wrong. But now the only thing left is that ParallaxEnabled is set to tue.

There are no error messages and the game on itself seems to keep running, it doesn’t crash.

Does someone have suggestions for me :).

Thanks! [import]uid: 127668 topic_id: 28904 reply_id: 328904[/import]

I have somewhat fixed it for the moment, but it isn’t working perfectly:

The map instance should be set to:
[lua]map:disableScreenClamping()[/lua]

And in lime-utils.lua around line 480 in function dragObject I change to:
[lua]— Drags an object
– (something that has an X and Y property).
@param object The object to drag.
@param event The Touch event.
function dragObject(object, event)

local _object = object
local _event = event

if not _object then
return
end

if not _object.x or not _object.y then
return
end

if(_event.phase==“began”) then

_object.touchPosition = {}
_object.touchPosition.x = _event.x - _object.x
_object.touchPosition.y = _event.y - _object.y

elseif(_event.phase==“moved”) then

if not _object.touchPosition then
_object.touchPosition = {}
_object.touchPosition.x = _event.x - _object.x
_object.touchPosition.y = _event.y - _object.y
end

– ORIGINAL
–_object.x = _event.x - _object.touchPosition.x
–_object.y = _event.y - _object.touchPosition.y

– TEMP FIX
local resultY = _event.y - _object.touchPosition.y
print(resultY)
if(resultY < 0 and resultY > -481)then
_object.y = resultY
end
–end

end

end[/lua]

I think it’s a bug, I will submit it to Lime. [import]uid: 127668 topic_id: 28904 reply_id: 116409[/import]