Hi Brent,
I was thinking, that the ball will bounce from the basket/wall and drop to the floor, and then bounce back to the user location, so there is still physics apply to the ball and floor, transition.to may not be ideal for such case?
I was trying to figure out how to do it with touch joint and understand how the physics work. In the following example, the main object is the “Red” ball, and I want it to “bounce” to the user location which is the “Green” circle after hitting the floor.
If I activate the touch joint, the Red is basically rotating/orbiting around the Green circle, and don’t know how the Red ball can gradually bounce to position of Green circle?
====
physics = require “physics”
physics.start ()
physics.setGravity( 0, 9.8 )
physics.setDrawMode( “hybrid” )
Red = display.newCircle ( 100, 150, 20)
Red:setFillColor (1, 0, 0)
physics.addBody (Red, “dynamic”, {density = 1, friction = 0, bounce = 1} )
Floor = display.newRect ( 250, 350, 400, 30)
physics.addBody (Floor, “static” )
Green = display.newCircle ( 400, 200, 20)
Green:setFillColor (0, 1, 0)
–touchJoint = physics.newJoint(“touch”, Red, Green.x, Green.y)
======
Thanks,
Justin