I’m out and about but did you include the following?
The set positionIterations is defaulted to 8 (if you don’t put anything) but if you increase it to 16 (I use 32 and start cutting back)things will act differently.
Case in point, I had a rotating platform at a medium speed, and the platform would keep “pushing” through a falling ball that would hit it. I changed the iterations to 32, and BAM the physics started acting right.
For your issue, I know what you are saying now. I have problems when I have an elevator type of platform that goes up and down and when I use tilt controls based on gravity (left to right only) things don’t act right when the platform is coming up.
local physics = require(“physics”)
physics.start(true)
physics.setScale( 60 )
physics.setGravity( 0, 10)
physics.setPositionIterations(8)
I’m going to now just start answering random questions you had that I know (im really new, never programmed as of 90 days as of today hehe, but I’ve learned a lot and made a ton of stupid mistakes).
"can I set the screen to always follow a group?"
Yes you can: (Look at Camera Follow Circle at the bottom of the lua code, you can adapt it however you like)
Here is an example I created for something else, has a camera listener and other stuff. Not sure if the best way to go about it, but for me it’s working 
Ok, Here it is. It’s kind of scattered, but I cleaned it up (it was over 1100 lines, I removed my “secret sauce” and pasted everything in that seemed relevant. I put some in groups, one object I didn’t (eplat8) and it’s commented pretty heavily.
I also included some fun animation things too.
Have a go with it!
(Again, it’s not as clean as I would like, but It’s still fun. I’m working on being tidy )
Ok back to work 
Btw, it’s all plug n play using system generated shapes (I like to do this so people don’t go HEY WHERE THE ##$%@#$@#$ ARE THE IMAGES GRRRR!). Ok here we go:
display.setStatusBar( display.HiddenStatusBar )
--Nicholas Golden's crazy animation weird pack thingy
--This is a bunch of stuff I have learned, decided to put into a big honking demo thing.
--Many contributors helped me with it from corona.
local physics = require("physics")
physics.start()
-- Scale set to 60, also added "true" on all display objects to prevent sleepiness
physics.setScale( 60 )
--Set only Y gravity and 0 to X
physics.setGravity( 0, 9.8 )
physics.setPositionIterations(8)
-- initial gravity points downwards
--Load sound track
local soundtrack = audio.loadStream("media/Place your sound here")
---If you want to loop, you use -1 otherwise you can specify a value
audio.play(soundtrack, {loops=-1})
-- Create master display group (for global "camera" scrolling effect)
local game = display.newGroup();
game.x = 0
game.y = 0
--Don't forget to insert everything into a group that you want to scroll!
--Load images
--In order 1st one listed goes in back, 2nd in front of previous, etc
--This is to keep everything "layered" Lua reads top down, so yea.
local back = display.newRect(0, 0, 2912, display.contentHeight)
back:setFillColor(165, 210, 255)
game:insert (back)
local ball = display.newCircle( 0,0,40,40, true)
ball.x =630; ball.y = 20
physics.addBody( ball, { density=1.0, friction=10, bounce=0.2, radius=40 } )
ball.isBullet = true
game:insert( ball )
--+++++++++++++++++++++++++++++++Level Borders++++++++++++++++++++++++++++++
--++++++++++++++++++++++++++++++++BEGIN++++++++++++++++++++++++++++++++++
----464 w 2912 L - level size
--images (X, Y = placement X, Y = size)
--left border
local lside = display.newRect( 0, 0, 10, 640 )
lside:setFillColor(255,255,255)
physics.addBody( lside,"static", { friction=3, bounce=0.3, isGround = true } )
game:insert (lside)
lside.rotation = 180
--right border
local rside = display.newRect( 2912,0,10, 640 )
rside:setFillColor(255,255,255)
physics.addBody( rside,"static", { friction=3, bounce=0.3, isGround = true } )
game:insert (rside)
rside.rotation = 0
--top border
local tside = display.newRect( 0, 0, 2912, 10 )
tside:setFillColor(255,255,255)
physics.addBody( tside,"static", { friction=3, bounce=0.3, isGround = true } )
game:insert (tside)
tside.rotation = 0
--bottom border
local bside = display.newRect( 0, 630, 2912, 20 )
bside:setFillColor(255,255,255)
physics.addBody( bside,"static", { friction=3, bounce=0.3, isGround = true } )
game:insert (bside)
bside.rotation = 0
--+++++++++++++++++++++++++++++++Level Borders++++++++++++++++++++++++++++++
--++++++++++++++++++++++++++++++++++END+++++++++++++++++++++++++++++++++
--moving objects
local mplat1 = display.newRect( 600, 480, 300, 10 )
mplat1:setFillColor(255,0,255)
physics.addBody( mplat1,"static", { friction=3, bounce=0.3, isGround = true } )
mplat1.rotation = 0
game:insert (mplat1)
local rotateAmount = 0
local time = system.getTimer()
local function animate( event )
mplat1.rotation = mplat1.rotation + -5
local now = system.getTimer()
local elapsed = now - time
local rotationAngle = rotateAmount \* (elapsed / 1000.0) \* 10
time = now
mplat1.rotation = mplat1.rotation + rotationAngle
end
Runtime:addEventListener( "enterFrame", animate )
--elevator up and down
eplat1 = display.newRect( 0, 430, 80, 50)
eplat1:setFillColor(25,200,35)
eplat1.x = 500
game:insert (eplat1)
physics.addBody( eplat1,"static", { friction=3, bounce=0.3, isGround = true } )
function goUp1 ()
transition.to(eplat1, { time=1500, y=(eplat1.y - 150), onComplete=goDown1} )
end
-- changing time will dictate how fast the object goes right on return
function goDown1()
transition.to(eplat1, { time=300, y=(eplat1.y + 150), onComplete=goUp1} )
end
goUp1()
eplat3 = display.newRect( 0, 580, 80, 50)
eplat3:setFillColor(180,100,135)
eplat3.x = 1900
game:insert (eplat3)
physics.addBody( eplat3,"static", { friction=3, bounce=0.3, isGround = true } )
function goUp3 ()
transition.to(eplat3, { time=1500, y=(eplat3.y - 150), onComplete=goDown3} )
end
-- changing time will dictate how fast the object goes right on return
function goDown3()
transition.to(eplat3, { time=300, y=(eplat3.y + 150), onComplete=goUp3} )
end
goUp3()
--STATIC OBJECTS
local rect6 = display.newRect( 0, 200, 200, 40 )
rect6:setFillColor(200,10,90)
physics.addBody( rect6,"static", { friction=3, bounce=0.3, isGround = true } )
rect6.rotation = 45
game:insert (rect6)
--Added a bunch of non physics properties for you to track notts\_forest\_
--SPaced them out to see the scrolling effect.
eplat4 = display.newRect( 500, 80, 80, 50)
eplat4:setFillColor(80,100,135)
game:insert (eplat4)
eplat5 = display.newRect( 800, 80, 80, 50)
eplat5:setFillColor(80,100,135)
game:insert (eplat5)
eplat6 = display.newRect( 1100, 80, 80, 50)
eplat6:setFillColor(80,100,135)
game:insert (eplat6)
eplat7 = display.newRect( 1500, 80, 80, 50)
eplat7:setFillColor(80,100,135)
game:insert (eplat7)
eplat8 = display.newRect( 300, 80, 80, 50)
eplat8:setFillColor(255,0,135)
--NOT in group "game" see how it DOESN'T move?
--I use this for "Score Board" etc
--+++++++++++BEGING TILT CONTROL Code
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--ONLY allows left and right control of ALL objects in a level. If you have a world which is
--platforms and ramps etc, and the only thing that is movable is your object this will work.
--otherwise if you have things hanging from chains, ropes or things that react to physics this will affect those items
--If you want to SPECIFICALLY control the object ONLY, you'll need another control method and put listeners on the object etc
system.setAccelerometerInterval( 100 ) -- set accelerometer to maximum responsiveness
function onTilt( event )
physics.setGravity( ( 9.8 \* event.yGravity ), ( 9.8 ) )
end
Runtime:addEventListener( "accelerometer", onTilt )
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--+++++++++++++++++++++END TILT CONTROL Code +++++++++++++++++++++++++++
---+++CAMERA FOLLLOW CIRCLE+++
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local function moveCamera()
--orig line if (ball.x \> 200 and ball.x \< 2040) then
if (ball.x \> 480 and ball.x \< 2912) then
game.x= -ball.x + 480
--ball.x \> K and game.x= -ball.x + K
--K values should match, otherwise the screen will "snap"
--game.x= -ball.x 200 says where it shows up on screen (position)
end
end
local function moveCamera1()
if (ball.y \> 0 and ball.y \< 0) then
game.y= -ball.y + 0
--game.y = -ball.y 200 says where it shows up on screen (position)
end
end
Runtime:addEventListener( "enterFrame", moveCamera )
--TEST remove if necessary
Runtime:addEventListener( "enterFrame", moveCamera1 )
---END ++++ CAMERA FOLLOW BALL+++
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
And build settings
(create build.settings file)
settings = {
orientation =
{
default = "landscapeLeft",
supported =
{
},
},
}
And config.lua
[code]
application =
{
content =
{
width=640,
height=960,
fps = 30,
scale = “letterbox”
},
}
Ok have fun lol.
[/code] [import]uid: 61600 topic_id: 13863 reply_id: 51127[/import]