Static Objects in the air


I’m Marco and I’m new with the state machines.
I’m using the online platform and I’d like to create a ball that stands in front of the iCub’s camera, possibly without any stuff to hold the ball in air.
A solution i though was to use the “Tutorial baseball experiment” and change the state machine “BallThrowingMachine” in order to create the ball in a position and hold it there. The ball shouldn’t be affected by gravity and it should stay there even if the iCub touches the ball.

Is it a good idea ? How can i make it cleaner ?

Thank you for the support