Sorry, I should have attached the code I used.
I did make a few additional tweaks.
1) I set the scale so that the size of the soccer ball in reality matches the pixels used for its image.
2) I turned gravity on for the scale used.
3) I removed your sprite visible commands. They are visible by default.
4) I set the bar to be a kinematic object.
5) I set the mass of the soccer ball to its actual mass (physics engines sometime freak out over 0 mass).
6) I gave the ball a coefficient of restititution so that it bounces as expected.
7) I removed the redundant setphysicsshape commands from your do loop.
rem test
scale# = 0.005
setphysicsscale(scale#)
setphysicsgravity(0, 10/scale#)
// set the resolution
SetVirtualResolution ( 320, 480 )
SetPhysicsDebugOn ( )
// Load image and make barre sprite
barreImage = LoadImage ( "barre.png" )
barreSprite = CreateSprite (barreImage )
SetSpritePosition ( barreSprite, -16, 400 )
SetSpritePhysicsOn ( barreSprite, 3 )
// Load image and make ball sprite
ballImage = LoadImage ( "ball.png" )
ballSprite = CreateSprite (ballImage )
SetSpritePosition ( ballSprite, 160, 0 )
SetSpritePhysicsOn ( ballSprite, 2 )
SetSpriteShape ( ballSprite, 1 )
SetSpritePhysicsMass( ballSprite,0.45)
setspritephysicsrestitution(ballsprite, 0.7)
angSprite = 0
minAngleBarre = -18
maxAngleBarre = 18
// boutons
buttonLeft = 1
buttonRight = 2
AddVirtualButton( buttonLeft, 16, 432, 32 )
AddVirtualButton( buttonRight, 300, 432, 32 )
// main
do
// Left
if (GetVirtualButtonState (buttonRight) = 1)
if (angSprite<maxAngleBarre) then inc angSprite
endif
// right
if (GetVirtualButtonState (buttonLeft) = 1)
if (angSprite>minAngleBarre) then dec angSprite
endif
// maj angle barre
SetSpriteAngle( barreSprite, angSprite )
print (angSprite)
Sync()
loop
Hope this helps.