I have this function being called every frame to scroll down platforms depending on the player height.
I have all platforms inside scrollableGroup.
If I try to change the y value the platform moves but the collision happens in the same place
applyLinearImpulse() doesnt do anything.
setLinearVelocity() works, but then I need a timer to stop it from moving.
Is there a proper way to move them?
function scrollPlatforms() -- UpdatePlatforms handles gameplay object movements if player.y \< -scrollableGroup.y + 240 then --scrollableGroup.y = -(player.y - 240) --platform:applyLinearImpulse( 0, 10, platform.x, platform.y ) --platform:setLinearVelocity(0, 40) --timer.performWithDelay( 250, test, 1 ) elseif player.y \> -scrollableGroup.y + 480 then --gameOver() end end