im using perspective.lua, when i set parralaxRatio its not working.
the object still moving at same speed. help
What debug steps have you taken so far?
If you have the code (which I assume you do), you can simply instrument it (add print statements, etc in the funcitonal bits) to see what it is doing.
Also, we can’t really help with this level of bug description detail. If you want us to be able to help you, do at least one of the following:
#1. Post a link to the location you downloaded perspective.lua from (there are official and unofficial locations.
- AND -
Neatly (see image below for how to format posted code) post just the code where you use perspective.lua, showing us how you used it.
– OR –
#2. Package up a full sample project demonstrating just the problem, put it on dropbox (or other) and share it so we can see the problem for ourselves.
Note: Only some folks here use Caleb’s library, so you need to do the above to improve your odds of getting help. Following my advice will allow those familiar with the library to help, and those who don’t use it to examine the library and your code and possibly help.
@Roaminggamer : thx for replay sir,
1.I’m downloading at GitHub and it officialy from Caleb.(https://gist.github.com/GymbylCoding/8675733) I’m using perspective.lua v2.1.0
- here my code
[lua]
camera:add(coba,1,true)
camera:add(nyawa1,1,false)
camera:add(tentara,1,false)
camera:add(tentara2,1,false)
camera:add(tentara3,1,false)
camera:add(grass,2,false)
camera:add(warning,3,false)
camera:add(warning2,3,false)
camera:add(keLevel2,3,false)
camera:add(rumah,3,false)
camera:add(rumah2,3,false)
camera:add(rumah3,3,false)
camera:add(gunung,4,false)
camera:add(gunung2,4,false)
camera:add(gunung3,4,false)
camera:add(gunung4,4,false)
camera:add(gunung5,4,false)
camera:add(gunung6,4,false)
camera:add(gunung7,4,false)
camera:add(gunung8,4,false)
camera:add(gunung9,4,false)
camera:add(gunung10,4,false)
camera:add(gunung11,4,false)
camera:add(gunung12,4,false)
camera:add(gunung13,4,false)
camera:add(awan,5,false)
camera:add(awan2,5,false)
camera:add(awan3,5,false)
camera:add(awan4,5,false)
camera:add(awan5,5,false)
camera:add(awan6,5,false)
camera:add(awan7,5,false)
camera:add(awan8,5,false)
camera:add(atap,6,false)
camera:add(atap2,6,false)
camera:add(atap3,6,false)
levelWidth = camera:layer(2).width
camera:setBounds(display.contentWidth/2,levelWidth-display.contentWidth, -1000,display.contentHeight)
camera.damping=3
camera:layer(4).parallaxRatio=0.5
[/lua]
there is bug or not I’m still duno sir
What debug steps have you taken so far?
If you have the code (which I assume you do), you can simply instrument it (add print statements, etc in the funcitonal bits) to see what it is doing.
Also, we can’t really help with this level of bug description detail. If you want us to be able to help you, do at least one of the following:
#1. Post a link to the location you downloaded perspective.lua from (there are official and unofficial locations.
- AND -
Neatly (see image below for how to format posted code) post just the code where you use perspective.lua, showing us how you used it.
– OR –
#2. Package up a full sample project demonstrating just the problem, put it on dropbox (or other) and share it so we can see the problem for ourselves.
Note: Only some folks here use Caleb’s library, so you need to do the above to improve your odds of getting help. Following my advice will allow those familiar with the library to help, and those who don’t use it to examine the library and your code and possibly help.
@Roaminggamer : thx for replay sir,
1.I’m downloading at GitHub and it officialy from Caleb.(https://gist.github.com/GymbylCoding/8675733) I’m using perspective.lua v2.1.0
- here my code
[lua]
camera:add(coba,1,true)
camera:add(nyawa1,1,false)
camera:add(tentara,1,false)
camera:add(tentara2,1,false)
camera:add(tentara3,1,false)
camera:add(grass,2,false)
camera:add(warning,3,false)
camera:add(warning2,3,false)
camera:add(keLevel2,3,false)
camera:add(rumah,3,false)
camera:add(rumah2,3,false)
camera:add(rumah3,3,false)
camera:add(gunung,4,false)
camera:add(gunung2,4,false)
camera:add(gunung3,4,false)
camera:add(gunung4,4,false)
camera:add(gunung5,4,false)
camera:add(gunung6,4,false)
camera:add(gunung7,4,false)
camera:add(gunung8,4,false)
camera:add(gunung9,4,false)
camera:add(gunung10,4,false)
camera:add(gunung11,4,false)
camera:add(gunung12,4,false)
camera:add(gunung13,4,false)
camera:add(awan,5,false)
camera:add(awan2,5,false)
camera:add(awan3,5,false)
camera:add(awan4,5,false)
camera:add(awan5,5,false)
camera:add(awan6,5,false)
camera:add(awan7,5,false)
camera:add(awan8,5,false)
camera:add(atap,6,false)
camera:add(atap2,6,false)
camera:add(atap3,6,false)
levelWidth = camera:layer(2).width
camera:setBounds(display.contentWidth/2,levelWidth-display.contentWidth, -1000,display.contentHeight)
camera.damping=3
camera:layer(4).parallaxRatio=0.5
[/lua]
there is bug or not I’m still duno sir